from vnpy.trader.database import DB_TZ
然后输入如下代码
dt = datetime.strptime(row["datetime"], "%Y-%m-%d %H:%M:%S")
bar = BarData(
symbol=row["symbol"],
exchange=Exchange(row["exchange"]),
datetime=DB_TZ.localize(dt),
interval=Interval.MINUTE,
open_price=float(row["open"]),
high_price=float(row["high"]),
low_price=float(row["low"]),
close_price=float(row["close"]),
volume=row["volume"],
open_interest=row["open_interest"],
gateway_name="DB"
)
bars.append(bar)
就会报错AttributeError: 'zoneinfo.ZoneInfo' object has no attribute 'localize'。
请问如何处理