Python Forum
So, a mass of errors trying to run a zipline-dependant program on 3.5 env
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
So, a mass of errors trying to run a zipline-dependant program on 3.5 env
#1
After a day and a half rasslin' with getting zipline to work, let me tell you, that was fun, got a whole bunch of these:


Error:
--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-1-e7c21329eab2> in <module>() 56 handle_data=handle_data, 57 capital_base=10000, ---> 58 data_frequency = 'daily', bundle='quandl' 59 ) C:\Users\M S\anaconda3\envs\env_zipline\lib\site-packages\zipline\utils\run_algo.py in run_algorithm(start, end, initialize, capital_base, handle_data, before_trading_start, analyze, data_frequency, bundle, bundle_timestamp, trading_calendar, metrics_set, benchmark_returns, default_extension, extensions, strict_extensions, environ, blotter) 407 environ=environ, 408 blotter=blotter, --> 409 benchmark_spec=benchmark_spec, 410 ) 411 C:\Users\M S\anaconda3\envs\env_zipline\lib\site-packages\zipline\utils\run_algo.py in _run(handle_data, initialize, before_trading_start, analyze, algofile, algotext, defines, data_frequency, capital_base, bundle, bundle_timestamp, start, end, output, trading_calendar, print_algo, metrics_set, local_namespace, environ, blotter, benchmark_spec) 201 trading_calendar=trading_calendar, 202 capital_base=capital_base, --> 203 data_frequency=data_frequency, 204 ), 205 metrics_set=metrics_set, C:\Users\M S\anaconda3\envs\env_zipline\lib\site-packages\zipline\finance\trading.py in __init__(self, start_session, end_session, trading_calendar, capital_base, emission_rate, data_frequency, arena) 36 arena='backtest'): 37 ---> 38 assert type(start_session) == pd.Timestamp 39 assert type(end_session) == pd.Timestamp 40 AssertionError:
WTF does any of that even mean? Am I supposed to go back and learn from start to scratch how to code python from indexes arrays and onwards to be able to run a simple freaking program, for 3-6 months? I posted something earlier re: Installing modules, I'm not giving up yet but this is the first program to use zipline and it's sitting there laughing at me. Running this in my 3.5 env, it was "suggested" to have nb_conda installed However there is currently no version that I can see that is compatible with 3.5, and there's no version of zipline that seems to work with anything besides this little 3.5 env I set up, 3.6 was supposed to work but no, it didn't.

I'd post the code that generated it but it wasn't written by me, I figure it would be considered proprietary but if no one can tell me what's going on here I may have to, not that the program is a marvelous money-making machine it's a simple dang moving average and chart. Let me know anything you guys can think of.
Reply
#2
(Jan-20-2021, 07:09 AM)Evalias123 Wrote: Am I supposed to go back and learn from start
If "that" doesn't speak enough to you, then yes, you may need to go back and learn at least about how to read the traceback and probably more. It complains about the type of start_session (and I guess there will be same one with end_session). We don't see your code, but quick search and check:

https://github.com/quantopian/zipline/issues/2752
https://stackoverflow.com/questions/6151...on-zipline
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
So like you linked this particular code section/snippet was posted previously line-by-line from Klenow's Trading Evolved and it was apparently a date and time issue causing these Assertion errors. Many Thanks again once I get to actually start editing code for real I'll try to give back to the community. A bit aways at this point though. Link #2 contained the code solution .. been doing this for 2 weeks finally want to be able to get to the point of applying multiple mathematical tests and not just a moving average, have at least a mental framework and plan but it'll take some time to go manual, for me at least.


Wanted to mention this in case anyone had the "pleasure" of trying to install zipline, this is the set of instructions that mostly worked:

https://blog.quantinsti.com/zipline-libr...n-windows/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to do a mass replace within a CSV file? cubangt 9 5,351 May-09-2022, 06:52 PM
Last Post: snippsat
  Change of mass hexa data kosteloos 0 1,745 Aug-12-2019, 10:04 AM
Last Post: kosteloos
  Mass load images Linuxdesire 1 2,219 Mar-29-2019, 06:24 PM
Last Post: Larz60+
  mass rename files in folders kerzol81 5 9,084 Dec-29-2017, 09:08 PM
Last Post: wavic
  Some Confusing Program Errors (Newbie stuff) WildPictus 1 2,784 Sep-03-2017, 05:00 PM
Last Post: hbknjr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020