If you install the Interactive Brokers "ib" extras, you'd expect from nautilus_trader.adapters.interactive_brokers.historic.bar_data import BarDataDownloader to import without a ModuleNotFoundError.
This issue can be fixed by installing the missing package with $ pip install async-timeout or $ poetry add async-timeout. I think a better fix is updating the pyproject.toml with the following:
>> from nautilus_trader.adapters.interactive_brokers.historic.bar_data import BarDataDownloaderConfig
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/benjamin/Projects/nautilus-test/.venv/lib/python3.10/site-packages/nautilus_trader/adapters/interactive_brokers/historic/bar_data.py", line 22, in <module>
from nautilus_trader.adapters.interactive_brokers.historic.async_actor import AsyncActor
File "/Users/benjamin/Projects/nautilus-test/.venv/lib/python3.10/site-packages/nautilus_trader/adapters/interactive_brokers/historic/async_actor.py", line 24, in <module>
import async_timeout
ModuleNotFoundError: No module named 'async_timeout'
Steps to Reproduce the Problem
$ mkdir nautilus-test
$ cd nautilus-test
$ poetry init --no-interaction
$ sed -i '' '/^python = /c\
python = ">=3.10,<3.12"' pyproject.toml
$ poetry add nautilus-trader -E ib
$ poetry shell
$ python
>> from nautilus_trader.adapters.interactive_brokers.historic.bar_data import BarDataDownloaderConfig
...
ModuleNotFoundError: No module named 'async_timeout'
Bug Report
Expected Behavior
If you install the Interactive Brokers "ib" extras, you'd expect
from nautilus_trader.adapters.interactive_brokers.historic.bar_data import BarDataDownloader
to import without aModuleNotFoundError
.This issue can be fixed by installing the missing package with
$ pip install async-timeout
or$ poetry add async-timeout
. I think a better fix is updating thepyproject.toml
with the following:Actual Behavior
Steps to Reproduce the Problem
Specifications
nautilus_trader
version: 1.179.0