Skip to content

clean install fails - trading_calendars is broken and unmaintained #176

Closed
@Tantalon

Description

@Tantalon

A clean install of alpaca_backtrader_api fails on import:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/regg002/.local/share/virtualenvs/Repo-7RUXb6y2/lib/python3.9/site-packages/alpaca_backtrader_api/__init__.py", line 1, in <module>
    from .alpacastore import AlpacaStore
  File "/Users/regg002/.local/share/virtualenvs/Repo-7RUXb6y2/lib/python3.9/site-packages/alpaca_backtrader_api/alpacastore.py", line 12, in <module>
    import trading_calendars
  File "/Users/regg002/.local/share/virtualenvs/Repo-7RUXb6y2/lib/python3.9/site-packages/trading_calendars/__init__.py", line 16, in <module>
    from .trading_calendar import TradingCalendar
  File "/Users/regg002/.local/share/virtualenvs/Repo-7RUXb6y2/lib/python3.9/site-packages/trading_calendars/trading_calendar.py", line 33, in <module>
    from .calendar_helpers import (
  File "/Users/regg002/.local/share/virtualenvs/Repo-7RUXb6y2/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'

This is due to quantopian/trading_calendars#224: "[trading_calendars] isn't being maintained (see the README) although a fork exchange_calendars is being maintained and this issue was resolved in the latest release (3.2)." [ref]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions