alpaca-backtrader-api
alpaca-backtrader-api copied to clipboard
Cannot import alpaca-backtrader-api (Python 3.9.9 MacOS)
[~] python3
Python 3.9.9 (main, Nov 21 2021, 03:16:13)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import alpaca_backtrader_api
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.9/site-packages/alpaca_backtrader_api/__init__.py", line 1, in <module>
from .alpacastore import AlpacaStore
File "/opt/homebrew/lib/python3.9/site-packages/alpaca_backtrader_api/alpacastore.py", line 12, in <module>
import trading_calendars
File "/opt/homebrew/lib/python3.9/site-packages/trading_calendars/__init__.py", line 16, in <module>
from .trading_calendar import TradingCalendar
File "/opt/homebrew/lib/python3.9/site-packages/trading_calendars/trading_calendar.py", line 33, in <module>
from .calendar_helpers import (
File "/opt/homebrew/lib/python3.9/site-packages/trading_calendars/calendar_helpers.py", line 6, in <module>
NP_NAT = np.array([pd.NaT], dtype=np.int64)[0]
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NaTType'
>>>
Installed via pip3 install alpaca-backtrader-api
Downgrading pandas from 1.3.5
to 1.2.5
has allowed me to import.
Should still state that this repo seems outdated. None of the examples work anymore.
can confirm the same happens on ubuntu
@mitchweaver @Loopiezlol Are you guys able to run the example in README.md
? I keep getting an error. I will open an issue for this shortly.
@cspipaon No, all the examples are broken.
@mitchweaver I'm a new user to alpaca, is alpaca working for you at all or just the examples in README.md
are broken? If I can get clarity from @cspipaon I can go in and help fix them or update the documentation as I have bandwidth this summer and want to start using/learning alpaca