sysinit/futures/seed_price_data_from_IB.py
: "Can't read file" Error
#1547
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'd like to request help debugging seeding price data from IB. I performed the setup of the forked repo with
pyenv
according to the installation guide however I'm encountering an error with what looks like file paths. Please reference errors below. Any help is greatly appreciated! Thank you.`(.venv) -MacBook-Air:pysystemtrade $ python sysinit/futures/seed_price_data_from_IB.py
Configuring sim logging
Get initial price data from IB
Instrument code? DAX
2025-08-06 23:34:13 DEBUG root {'component': 'mongoIbBrokerClientIdData'} Locked IB client ID 132
2025-08-06 23:34:18 WARNING root {'component': 'ibFuturesInstrumentData'} Can't read file /Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/config/ib_config_futures.csv
Traceback (most recent call last):
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/config/ib_instrument_config.py", line 27, in read_ib_config_from_file
df = pd.read_csv(IB_FUTURES_CONFIG_FILE)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 948, in read_csv
return _read(filepath_or_buffer, kwds)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 611, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1448, in init
self._engine = self._make_engine(f, self.engine)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1705, in _make_engine
self.handles = get_handle(
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/pandas/io/common.py", line 863, in get_handle
handle = open(
FileNotFoundError: [Errno 2] No such file or directory: '/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/config/ib_config_futures.csv'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users//Dev/pysystemtrade/sysinit/futures/seed_price_data_from_IB.py", line 92, in
seed_price_data_from_IB(instrument_code)
File "/Users//Dev/pysystemtrade/sysinit/futures/seed_price_data_from_IB.py", line 17, in seed_price_data_from_IB
list_of_contracts = data_broker.get_list_of_contract_dates_for_instrument_code(
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysproduction/data/broker.py", line 118, in get_list_of_contract_dates_for_instrument_code
return self.broker_futures_contract_data.get_list_of_contract_dates_for_instrument_code(
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/ib_futures_contracts_data.py", line 61, in get_list_of_contract_dates_for_instrument_code
self._get_futures_instrument_object_with_IB_data(instrument_code)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/ib_futures_contracts_data.py", line 160, in _get_futures_instrument_object_with_IB_data
self.ib_futures_instrument_data.get_futures_instrument_object_with_IB_data(
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/ib_instruments_data.py", line 52, in get_futures_instrument_object_with_IB_data
config = self.ib_config
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/ib_instruments_data.py", line 84, in ib_config
config = self._get_and_set_ib_config_from_file()
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/ib_instruments_data.py", line 103, in _get_and_set_ib_config_from_file
config_data = read_ib_config_from_file(log=self.log)
File "/Users//.pyenv/versions/3.10.18/lib/python3.10/site-packages/sysbrokers/IB/config/ib_instrument_config.py", line 30, in read_ib_config_from_file
raise missingFile from e
syscore.exceptions.missingFile`
Beta Was this translation helpful? Give feedback.
All reactions