Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: '<' not supported between instances of 'Timestamp' and 'NoneType' #213

Open
SponzaMasoma20 opened this issue Aug 12, 2023 · 0 comments

Comments

@SponzaMasoma20
Copy link

Operater : windows 10
Python : 3.6

When I run

zipline run -t demo.py --state-file demo.state --broker ib --broker-uri localhost:7496:1232 --bundle quandl --data-frequency daily --realtime-bar-target ./realtime-bars

I get the error

(ziplinetrader) PS C:\Projects> zipline run -t demo.py --state-file demo.state --broker ib --broker-uri localhost:7496:1232 --bundle quandl --data-frequency daily --realtime-bar-target ./realtime-bars
[2023-08-09 10:37:03.847349] INFO: IB Broker: Connecting: localhost:7496:1232
Server Version: 76
TWS Time at connection:20230809 12:37:06 SAST
[2023-08-09 10:37:06.930920] INFO: IB Broker: [2104] Market data farm connection is OK:cafarm (-1)
[2023-08-09 10:37:06.992919] INFO: IB Broker: [2104] Market data farm connection is OK:hfarm (-1)
[2023-08-09 10:37:06.995953] INFO: IB Broker: [2104] Market data farm connection is OK:eufarmnj (-1)
[2023-08-09 10:37:06.996921] INFO: IB Broker: [2104] Market data farm connection is OK:cashfarm (-1)
[2023-08-09 10:37:06.997931] INFO: IB Broker: [2104] Market data farm connection is OK:uscrypto (-1)
[2023-08-09 10:37:06.998918] INFO: IB Broker: [2104] Market data farm connection is OK:usfuture (-1)
[2023-08-09 10:37:06.999954] INFO: IB Broker: [2104] Market data farm connection is OK:afarm (-1)
[2023-08-09 10:37:07.000932] INFO: IB Broker: [2104] Market data farm connection is OK:jfarm (-1)
[2023-08-09 10:37:07.001923] INFO: IB Broker: [2104] Market data farm connection is OK:usfarm.nj (-1)
[2023-08-09 10:37:07.002947] INFO: IB Broker: [2104] Market data farm connection is OK:usfarm (-1)
[2023-08-09 10:37:07.006921] INFO: IB Broker: [2106] HMDS data farm connection is OK:euhmds (-1)
[2023-08-09 10:37:07.007922] INFO: IB Broker: [2106] HMDS data farm connection is OK:cashhmds (-1)
[2023-08-09 10:37:07.008922] INFO: IB Broker: [2106] HMDS data farm connection is OK:fundfarm (-1)
[2023-08-09 10:37:07.009926] INFO: IB Broker: [2106] HMDS data farm connection is OK:ushmds (-1)
[2023-08-09 10:37:07.010920] INFO: IB Broker: [2158] Sec-def data farm connection is OK:secdefil (-1)
[2023-08-09 10:37:07.234975] DEBUG: IB Broker: Execution details completed for request 0
[2023-08-09 10:37:07.589973] INFO: IB Broker: Managed accounts: ['*********']
[2023-08-09 10:37:07.746115] INFO: IB Broker: Local-Broker Time Skew: 0 days 00:00:00.599976
Traceback (most recent call last):
File "C:\Projects\ziplinetrader\Scripts\zipline-script.py", line 33, in
sys.exit(load_entry_point('zipline-trader', 'console_scripts', 'zipline')())
File "C:\Projects\ziplinetrader\lib\site-packages\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "C:\Projects\ziplinetrader\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Projects\ziplinetrader\lib\site-packages\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Projects\ziplinetrader\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Projects\ziplinetrader\lib\site-packages\click\core.py", line 754, in invoke
return callback(*args, **kwargs)
File "c:\projects\zipline-trader\zipline_main
.py", line 111, in _
return f(*args, **kwargs)
File "C:\Projects\ziplinetrader\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\projects\zipline-trader\zipline_main
.py", line 400, in run
execution_id=None
File "c:\projects\zipline-trader\zipline\utils\run_algo.py", line 123, in _run
if trading_calendar.session_distance(start, end) < 1:
File "C:\Projects\ziplinetrader\lib\site-packages\trading_calendars\trading_calendar.py", line 752, in session_distance
negate = end_session_label < start_session_label
TypeError: '<' not supported between instances of 'Timestamp' and 'NoneType'

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant