FlorianWilhelm / zipline-poloniex

Poloniex bundle for zipline
MIT License
65 stars 13 forks source link

results.pickle cannot be opened in pandas #5

Open hugokoopmans opened 6 years ago

hugokoopmans commented 6 years ago

"Analyze the performance by reading results.pickle with the help of Pandas." does not work for me see https://github.com/quantopian/zipline/issues/475 but no solution provided yet

immackay commented 6 years ago

Hi,

Could you provide a little more information? A crash log, python version, anything of that sort would be appreciated. I myself am unable to reproduce this error with either python 3.4 or 3.5

hugokoopmans commented 6 years ago

Hi

now i installed everything for python 3.5 I get this error even before finishing th example algo.py conda with virtual env python 3.5 linux mint 18

(krakenex35) hugo@vaio ~/workspace-jupyter/kraken-api/examples $ zipline run -f ./my_algorithm.py -s 2017-11-04 -e 2017-11-10 -o results.pickle --data-frequency minute -b poloniex [2017-12-02 19:06:27.241722] INFO: Loader: Cache at /home/hugo/.zipline/data/SPY_benchmark.csv does not have data from 1990-01-01 00:00:00+00:00 to 2017-11-30 00:00:00+00:00.

[2017-12-02 19:06:27.242011] INFO: Loader: Downloading benchmark data for 'SPY' from 1989-12-31 00:00:00+00:00 to 2017-11-30 00:00:00+00:00 Traceback (most recent call last): File "/home/hugo/anaconda3/envs/krakenex35/bin/zipline", line 11, in load_entry_point('zipline==1.1.1', 'console_scripts', 'zipline')() File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(args, kwargs) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/main.py", line 97, in _ return f(*args, *kwargs) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), args, kwargs) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/main.py", line 240, in run environ=os.environ, File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/utils/run_algo.py", line 132, in _run env = TradingEnvironment(asset_db_path=connstr, environ=environ) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/finance/trading.py", line 99, in init self.bm_symbol, File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/data/loader.py", line 166, in load_market_data environ, File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/data/loader.py", line 230, in ensure_benchmark_data last_date, File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/zipline/data/benchmarks.py", line 50, in get_benchmark_returns last_date File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/pandas_datareader/data.py", line 137, in DataReader session=session).read() File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/pandas_datareader/base.py", line 181, in read params=self._get_params(self.symbols)) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/pandas_datareader/base.py", line 79, in _read_one_data out = self._read_url_as_StringIO(url, params=params) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/pandas_datareader/base.py", line 98, in _read_url_as_StringIO out.write(bytes_to_str(text)) File "/home/hugo/anaconda3/envs/krakenex35/lib/python3.5/site-packages/pandas/compat/init.py", line 72, in bytes_to_str return b.decode(encoding or 'utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 31853: invalid start byte