trading_calendars icon indicating copy to clipboard operation
trading_calendars copied to clipboard

Can't import trading_calendars

Open AwesomeCap opened this issue 2 years ago • 1 comments


TypeError Traceback (most recent call last) /var/folders/5z/nfxgl_ps6qlf5tvrct964q980000gn/T/ipykernel_864/56499229.py in ----> 1 import trading_calendars as tc

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/init.py in 14 # limitations under the License. 15 ---> 16 from .trading_calendar import TradingCalendar 17 from .calendar_utils import ( 18 clear_calendars,

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/trading_calendar.py in 31 import toolz 32 ---> 33 from .calendar_helpers import ( 34 NP_NAT, 35 compute_all_minutes,

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/calendar_helpers.py in 4 NANOSECONDS_PER_MINUTE = int(6e10) 5 ----> 6 NP_NAT = np.array([pd.NaT], dtype=np.int64)[0] 7 8

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NaTType'

AwesomeCap avatar Jun 28 '22 13:06 AwesomeCap

This package is not longer maintained. Read here:

https://github.com/quantopian/trading_calendars#important-note

rsheftel avatar Jun 28 '22 15:06 rsheftel