Closed Fun1628 closed 2 months ago
I am reading the code, I don't understand where VBT could have initiated IBData to give it this argument... very curious indeed.
Not much we can do here
Thanks to Cursor AI, I am able to fix the problem, the revised codes are
def __init__(self, *args, single_key=True, **kwargs):
super().__init__(*args, single_key=single_key, **kwargs)
self.resolve_client(None)
What happened here is single_key was added in vectorbtpro, and we need to update IBData to match. The cursor AI really helps a lot, it can pinpoint the problem in seconds
However, it causes other problem in the rest of the codes because they were expecting IBData(), so instead
def __init__(self, *args, single_key=True, **kwargs):
if not args and not kwargs:
# This is the case for the original no-argument __init__
self.resolve_client(None)
else:
# This is the case for the __init__ with arguments
super().__init__(*args, single_key=single_key, **kwargs)
self.resolve_client(None)
Setting
because yfinance doesn't allow 3 years. The IB is running well and then it is using fetch_symbol in ib.py to fetch historical data and after finished, it got this error
single_key is from vectorbt pro. So something is interesting there.