You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How did you install Zipline: conda install -c conda-forge zipline-reloaded
Python packages: $ pip freeze or $ conda list
Now that you know a little about me, let me tell you about the issue I am
having:
Description of Issue
In jupyter notebook I type:
from zipline import run_algorithm
report below:
TypeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from zipline import run_algorithm
File ~\anaconda3\envs\zip38\lib\site-packages\zipline_init_.py:21
17 import numpy as np
19 # This is not a place to dump arbitrary classes/modules for convenience,
20 # it is a place to expose the public interfaces.
---> 21 from zipline.utils.calendar_utils import get_calendar
23 from . import data
24 from . import finance
File ~\anaconda3\envs\zip38\lib\site-packages\zipline\utils\calendar_utils.py:5
2 from functools import partial
4 import pandas as pd
----> 5 from exchange_calendars import ExchangeCalendar as TradingCalendar
6 from exchange_calendars import clear_calendars
7 from exchange_calendars import get_calendar as ec_get_calendar # get_calendar,
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars_init_.py:16
1 #
2 # Copyright 2018 Quantopian, Inc.
3 #
(...)
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
---> 16 from .calendar_utils import (
17 clear_calendars,
18 deregister_calendar,
19 get_calendar,
20 get_calendar_names,
21 register_calendar,
22 register_calendar_alias,
23 register_calendar_type,
24 resolve_alias,
25 names_to_aliases,
26 aliases_to_names,
27 )
28 from .exchange_calendar import ExchangeCalendar
30 all = [
31 "clear_calendars",
32 "deregister_calendar",
(...)
41 "ExchangeCalendar",
42 ]
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars\calendar_utils.py:3
1 from typing import Literal
----> 3 from .calendar_helpers import parse_date, Date
4 from .always_open import AlwaysOpenCalendar
5 from .errors import CalendarNameCollision, CyclicCalendarAlias, InvalidCalendarName
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars\calendar_helpers.py:24
20 NP_NAT = pd.NaT.value
22 # Use Date type where input does not need to represent an actual session
23 # and will be parsed by parse_date.
---> 24 Date = pd.Timestamp | str | int | float | datetime.datetime
26 # Use Session type where input should represent an actual session and will
27 # be parsed by parse_session.
28 Session = Date
TypeError: unsupported operand type(s) for |: 'type' and 'type'
What did I do wrong?
Sincerely,
Lufq7
The text was updated successfully, but these errors were encountered:
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment
$ python --3.9.20
$ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'
$ pip freeze
or$ conda list
Now that you know a little about me, let me tell you about the issue I am
having:
Description of Issue
In jupyter notebook I type:
from zipline import run_algorithm
report below:
TypeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from zipline import run_algorithm
File ~\anaconda3\envs\zip38\lib\site-packages\zipline_init_.py:21
17 import numpy as np
19 # This is not a place to dump arbitrary classes/modules for convenience,
20 # it is a place to expose the public interfaces.
---> 21 from zipline.utils.calendar_utils import get_calendar
23 from . import data
24 from . import finance
File ~\anaconda3\envs\zip38\lib\site-packages\zipline\utils\calendar_utils.py:5
2 from functools import partial
4 import pandas as pd
----> 5 from exchange_calendars import ExchangeCalendar as TradingCalendar
6 from exchange_calendars import clear_calendars
7 from exchange_calendars import get_calendar as ec_get_calendar # get_calendar,
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars_init_.py:16
1 #
2 # Copyright 2018 Quantopian, Inc.
3 #
(...)
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
---> 16 from .calendar_utils import (
17 clear_calendars,
18 deregister_calendar,
19 get_calendar,
20 get_calendar_names,
21 register_calendar,
22 register_calendar_alias,
23 register_calendar_type,
24 resolve_alias,
25 names_to_aliases,
26 aliases_to_names,
27 )
28 from .exchange_calendar import ExchangeCalendar
30 all = [
31 "clear_calendars",
32 "deregister_calendar",
(...)
41 "ExchangeCalendar",
42 ]
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars\calendar_utils.py:3
1 from typing import Literal
----> 3 from .calendar_helpers import parse_date, Date
4 from .always_open import AlwaysOpenCalendar
5 from .errors import CalendarNameCollision, CyclicCalendarAlias, InvalidCalendarName
File ~\anaconda3\envs\zip38\lib\site-packages\exchange_calendars\calendar_helpers.py:24
20 NP_NAT = pd.NaT.value
22 # Use Date type where input does not need to represent an actual session
23 # and will be parsed by parse_date.
---> 24 Date = pd.Timestamp | str | int | float | datetime.datetime
26 # Use Session type where input should represent an actual session and will
27 # be parsed by parse_session.
28 Session = Date
TypeError: unsupported operand type(s) for |: 'type' and 'type'
What did I do wrong?
Sincerely,
Lufq7
The text was updated successfully, but these errors were encountered: