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

cannot read results.pickle #2030

Closed
hugokoopmans opened this issue Nov 30, 2017 · 4 comments
Closed

cannot read results.pickle #2030

hugokoopmans opened this issue Nov 30, 2017 · 4 comments

Comments

@hugokoopmans
Copy link

Dear Zipline Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

  • Operating System: (Windows Version or $ uname --all)
    Linux vaio 4.8.0-53-generic Change number representations from float to decimal #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Python Version: $ python --version
    Python 3.6.3 :: Anaconda, Inc.

  • Python Bitness: $ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'
    64

  • How did you install Zipline: (pip, conda, or other (please explain))
    conda > virtualenv

  • Python packages: $ pip freeze or $ conda list

packages in environment at /home/hugo/anaconda3/envs/krakenex:

alabaster 0.7.10 py36h306e16b_0
alembic 0.9.6
anaconda 5.0.1 py36hd30a520_1
anaconda-client 1.6.5 py36h19c0dcd_0
anaconda-navigator 1.6.9 py36h11ddaaa_0
anaconda-project 0.8.0 py36h29abdf5_0
asn1crypto 0.22.0 py36h265ca7c_1
astroid 1.5.3 py36hbdb9df2_0
astropy 2.0.2 py36ha51211e_4
babel 2.5.0 py36h7d14adf_0
backports 1.0 py36hfa02d7e_1
backports.shutil_get_terminal_size 1.0.0 py36hfea85ff_2
bcolz 0.12.1
beautifulsoup4 4.6.0 py36h49b8c8c_1
bitarray 0.8.1 py36h5834eb8_0
bkcharts 0.2 py36h735825a_0
blaze 0.11.3 py36h4e06776_0
bleach 2.0.0 py36h688b259_0
bokeh 0.12.10 py36hbb0e44a_0
boto 2.48.0 py36h6e4cd66_1
bottleneck 1.2.1 py36haac1ea0_0
bzip2 1.0.6 h0376d23_1
ca-certificates 2017.08.26 h1d4fec5_0
cairo 1.14.10 haa5651f_5
certifi 2017.7.27.1 py36h8b7b77e_0
cffi 1.10.0 py36had8d393_1
chardet 3.0.4 py36h0f667ec_1
click 6.7 py36h5253387_0
cloudpickle 0.4.0 py36h30f8c20_0
clyent 1.2.2 py36h7e57e65_1
colorama 0.3.9 py36h489cec4_0
contextlib2 0.5.5 py36h6c84a62_0
cryptography 2.0.3 py36ha225213_1
curl 7.55.1 hcb0b314_2
cycler 0.10.0 py36h93f1223_0
cyordereddict 1.0.0
cython 0.26.1 py36h21c49d0_0
cytoolz 0.8.2 py36h708bfd4_0
dask 0.15.3 py36hdc2c8aa_0
dask-core 0.15.3 py36h10e6167_0
datashape 0.5.4 py36h3ad6b5c_0
dbus 1.10.22 h3b5a359_0
decorator 4.1.2 py36hd076ac8_0
distributed 1.19.1 py36h25f3894_0
docutils 0.14 py36hb0f60f5_0
empyrical 0.3.2
entrypoints 0.2.3 py36h1aec115_2
et_xmlfile 1.0.1 py36hd6bccc3_0
expat 2.2.4 hc00ebd1_1
fastcache 1.0.2 py36h5b0c431_0
filelock 2.0.12 py36hacfa1f5_0
flask 0.12.2 py36hb24657c_0
flask-cors 3.0.3 py36h2d857d3_0
fontconfig 2.12.4 h88586e7_1
freetype 2.8 h52ed37b_0
get_terminal_size 1.0.0 haa9412d_0
gevent 1.2.2 py36h2fe25dc_0
glib 2.53.6 hc861d11_1
glob2 0.5 py36h2c1b292_1
gmp 6.1.2 hb3b607b_0
gmpy2 2.0.8 py36h55090d7_1
graphite2 1.3.10 hc526e54_0
greenlet 0.4.12 py36h2d503a6_0
gst-plugins-base 1.12.2 he3457e5_0
gstreamer 1.12.2 h4f93127_0
h5py 2.7.0 py36he81ebca_1
harfbuzz 1.5.0 h2545bd6_0
hdf5 1.10.1 hb0523eb_0
heapdict 1.0.0 py36h79797d7_0
html5lib 0.999999999 py36h2cfc398_0
icu 58.2 h211956c_0
idna 2.6 py36h82fb2a8_1
imageio 2.2.0 py36he555465_0
imagesize 0.7.1 py36h52d8127_0
intel-openmp 2018.0.0 h15fc484_7
intervaltree 2.1.0
ipykernel 4.6.1 py36hbf841aa_0
ipython 6.1.0 py36hc72a948_1
ipython_genutils 0.2.0 py36hb52b0d5_0
ipywidgets 7.0.0 py36h7b55c3a_0
isort 4.2.15 py36had401c0_0
itsdangerous 0.24 py36h93cc618_1
jbig 2.1 hdba287a_0
jdcal 1.3 py36h4c697fb_0
jedi 0.10.2 py36h552def0_0
jinja2 2.9.6 py36h489bce4_1
jpeg 9b habf39ab_1
jsonschema 2.6.0 py36h006f8b5_0
jupyter 1.0.0 py36h9896ce5_0
jupyter_client 5.1.0 py36h614e9ea_0
jupyter_console 5.2.0 py36he59e554_1
jupyter_core 4.3.0 py36h357a921_0
jupyterlab 0.27.0 py36h86377d0_2
jupyterlab_launcher 0.4.0 py36h4d8058d_0
krakenex 1.0.0
lazy-object-proxy 1.3.1 py36h10fcdad_0
libedit 3.1 heed3624_0
libffi 3.2.1 h4deb6c0_3
libgcc-ng 7.2.0 h7cc24e2_2
libgfortran-ng 7.2.0 h9f7466a_2
libpng 1.6.32 hda9c8bc_2
libsodium 1.0.13 h31c71d8_2
libssh2 1.8.0 h8c220ad_2
libstdcxx-ng 7.2.0 h7a57d05_2
libtiff 4.0.8 h90200ff_9
libtool 2.4.6 hd50d1a6_0
libxcb 1.12 h84ff03f_3
libxml2 2.9.4 h6b072ca_5
libxslt 1.1.29 hcf9102b_5
llvmlite 0.20.0 py36_0
locket 0.2.0 py36h787c0ad_1
Logbook 1.1.0
lru-dict 1.1.6
lxml 4.1.0 py36h5b66e50_0
lzo 2.10 h1bfc0ba_1
Mako 1.0.7
markupsafe 1.0 py36hd9260cd_1
matplotlib 2.1.0 py36hba5de38_0
mccabe 0.6.1 py36h5ad9710_1
mistune 0.7.4 py36hbab8784_0
mkl 2018.0.0 hb491cac_4
mkl-service 1.1.2 py36h17a0993_4
mpc 1.0.3 hf803216_4
mpfr 3.1.5 h12ff648_1
mpmath 0.19 py36h8cc018b_2
msgpack-python 0.4.8 py36hec4c5d1_0
multipledispatch 0.4.9 py36h41da3fb_0
navigator-updater 0.1.0 py36h14770f7_0
nbconvert 5.3.1 py36hb41ffb7_0
nbformat 4.4.0 py36h31c9010_0
ncurses 6.0 h06874d7_1
networkx 2.0 py36h7e96fb8_0
nltk 3.2.4 py36h1a0979f_0
nose 1.3.7 py36hcdf7029_2
notebook 5.0.0 py36h0b20546_2
numba 0.35.0 np113py36_10
numexpr 2.6.2 py36hdd3393f_1
numpy 1.13.3 py36ha12f23b_0
numpydoc 0.7.0 py36h18f165f_0
odo 0.5.1 py36h90ed295_0
olefile 0.44 py36h79f9f78_0
openpyxl 2.4.8 py36h41dd2a8_1
openssl 1.0.2l h077ae2c_5
packaging 16.8 py36ha668100_1
pandas 0.18.1
pandas 0.20.3 py36h842e28d_2
pandas-datareader 0.5.0
pandoc 1.19.2.1 hea2e7c5_1
pandocfilters 1.4.2 py36ha6701b7_1
pango 1.40.11 h8191d47_0
partd 0.3.8 py36h36fd896_0
patchelf 0.9 hf79760b_2
path.py 10.3.1 py36he0c6f6d_0
pathlib2 2.3.0 py36h49efa8e_0
patsy 0.4.1 py36ha3be15e_0
pcre 8.41 hc71a17e_0
pep8 1.7.0 py36h26ade29_0
pexpect 4.2.1 py36h3b9d41b_0
pickleshare 0.7.4 py36h63277f8_0
pillow 4.2.1 py36h9119f52_0
pip 9.0.1 py36h8ec8b28_3
pixman 0.34.0 h83dc358_2
pkginfo 1.4.1 py36h215d178_1
ply 3.10 py36hed35086_0
prompt_toolkit 1.0.15 py36h17d85b1_0
psutil 5.4.0 py36h84c53db_0
psycopg2 2.7.3.2
ptyprocess 0.5.2 py36h69acd42_0
py 1.4.34 py36h0712aa3_1
pycodestyle 2.3.1 py36hf609f19_0
pycosat 0.6.2 py36h1a0ea17_1
pycparser 2.18 py36hf9f622e_1
pycrypto 2.6.1 py36h6998063_1
pycurl 7.43.0 py36h5e72054_3
pyflakes 1.6.0 py36h7bd6a15_0
pygments 2.2.0 py36h0d3125c_0
pylint 1.7.4 py36hb9d4533_0
pyodbc 4.0.17 py36h999153c_0
pyopenssl 17.2.0 py36h5cc804b_0
pyparsing 2.2.0 py36hee85983_1
pyqt 5.6.0 py36h0386399_5
pysocks 1.6.7 py36hd97a5b1_1
pytables 3.4.2 py36h3b5282a_2
pytest 3.2.1 py36h11ad3bb_1
python 3.6.3 hc9025b9_1
python-dateutil 2.6.1 py36h88d3b88_1
python-editor 1.0.3
pytz 2017.2 py36hc2ccc2a_1
pywavelets 0.5.2 py36he602eb0_0
pyyaml 3.12 py36hafb9ca4_1
pyzmq 16.0.2 py36h3b0cf96_2
qt 5.6.2 h974d657_12
qtawesome 0.4.4 py36h609ed8c_0
qtconsole 4.3.1 py36h8f73b5b_0
qtpy 1.3.1 py36h3691cc8_0
readline 7.0 hac23ff0_3
requests 2.18.4 py36he2e5f8d_1
requests-file 1.4.2
requests-ftp 0.3.1
rope 0.10.5 py36h1f8c17e_0
ruamel_yaml 0.11.14 py36ha2fb22d_2
scikit-image 0.13.0 py36had3c07a_1
scikit-learn 0.19.1 py36h7aa7ec6_0
scipy 0.19.1 py36h9976243_3
seaborn 0.8.0 py36h197244f_0
setuptools 36.5.0 py36he42e2e1_0
simplegeneric 0.8.1 py36h2cb9092_0
singledispatch 3.4.0.3 py36h7a266c3_0
sip 4.18.1 py36h51ed4ed_2
six 1.11.0 py36h372c433_1
snowballstemmer 1.2.1 py36h6febd40_0
sortedcollections 0.5.3 py36h3c761f9_0
sortedcontainers 1.5.7 py36hdf89491_0
sphinx 1.6.3 py36he5f0bdb_0
sphinxcontrib 1.0 py36h6d0f590_1
sphinxcontrib-websupport 1.0.1 py36hb5cb234_1
spyder 3.2.4 py36hbe6152b_0
sqlalchemy 1.1.13 py36hfb5efd7_0
sqlite 3.20.1 h6d8b0f3_1
statsmodels 0.8.0 py36h8533d0b_0
sympy 1.1.1 py36hc6d1c1c_0
TA-Lib 0.4.10
tblib 1.3.2 py36h34cf8b6_0
terminado 0.6 py36ha25a19f_0
testpath 0.3.1 py36h8cadb63_0
tk 8.6.7 h5979e9b_1
toolz 0.8.2 py36h81f2dff_0
tornado 4.5.2 py36h1283b2a_0
traitlets 4.3.2 py36h674d592_0
typing 3.6.2 py36h7da032a_0
unicodecsv 0.14.1 py36ha668878_0
unixodbc 2.3.4 hc36303a_1
urllib3 1.22 py36hbe7ace6_0
wcwidth 0.1.7 py36hdf4376a_0
webencodings 0.5.1 py36h800622e_1
werkzeug 0.12.2 py36hc703753_0
wheel 0.29.0 py36he7f4e38_1
widgetsnbextension 3.0.2 py36hd01bb71_1
wrapt 1.10.11 py36h28b7045_0
xlrd 1.1.0 py36h1db9f0c_1
xlsxwriter 1.0.2 py36h3de1aca_0
xlwt 1.3.0 py36h7b00a1f_0
xz 5.2.3 h2bcbf08_1
yaml 0.1.7 h96e3832_1
zeromq 4.2.2 hb0b69da_1
zict 0.1.3 py36h3a3bf81_0
zipline 1.1.1
zipline-poloniex 0.1.2
zlib 1.2.11 hfbfcf68_1

Now that you know a little about me, let me tell you about the issue I am
having:

Description of Issue

I have use https://github.com/FlorianWilhelm/zipline-poloniex to fetch a small dataset prom poloniex.

The i ran zipline from the CLI like:
zipline run -f ./my_algorithm.py -s 2017-11-02 -e 2017-11-04 -o results.pickle --data-frequency minute -b poloniex
[2017-11-27 20:14:36.240122] 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-25 00:00:00+00:00.

[2017-11-27 20:14:36.240395] INFO: Loader: Downloading benchmark data for 'SPY' from 1989-12-31 00:00:00+00:00 to 2017-11-25 00:00:00+00:00
[2017-11-27 20:14:36.565260] WARNING: Loader: Still don't have expected data after redownload!
[2017-11-27 20:14:36.604656] INFO: Loader: Cache at /home/hugo/.zipline/data/treasury_curves.csv does not have data from 1990-01-01 00:00:00+00:00 to 2017-11-25 00:00:00+00:00.

[2017-11-27 20:14:36.604932] INFO: Loader: Downloading treasury data for 'SPY'.
[2017-11-27 20:14:39.340978] WARNING: Loader: Still don't have expected data after redownload!
[2017-11-27 21:14:39] INFO:builtins:Dummy agent loaded
[2017-11-27 21:14:39] INFO:builtins:Initializing agent...
[2017-11-27 20:14:47.937876] INFO: Performance: Simulated 3 trading days out of 3.
[2017-11-27 20:14:47.938025] INFO: Performance: first open: 2017-11-02 00:00:00+00:00
[2017-11-27 20:14:47.938134] INFO: Performance: last close: 2017-11-04 23:59:00+00:00

  • What did you expect to happen?
    I expect the resulting result.pickle to open if reading it with pandas.
import pandas as pd
perf = pd.read_pickle('./results.pickle') # read in perf DataFrame
perf.head()
  • What happened instead?
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     51             with open(path, 'rb') as fh:
---> 52                 return pkl.load(fh)
     53         except Exception:

pandas/tslib.pyx in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:9203)()

pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:25854)()

TypeError: Cannot convert input to Timestamp

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     56                 with open(path, 'rb') as fh:
---> 57                     return pc.load(fh, encoding=encoding, compat=False)
     58 

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load(fh, encoding, compat, is_verbose)
    116 
--> 117         return up.load()
    118     except:

~/anaconda3/envs/krakenex/lib/python3.6/pickle.py in load(self)
   1049                 assert isinstance(key, bytes_types)
-> 1050                 dispatch[key[0]](self)
   1051         except _Stop as stopinst:

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load_reduce(self)
     16 
---> 17     if type(args[0]) is type:
     18         n = args[0].__name__

IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in read_pickle(path)
     64     try:
---> 65         return try_read(path)
     66     except:

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     61                 with open(path, 'rb') as fh:
---> 62                     return pc.load(fh, encoding=encoding, compat=True)
     63 

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load(fh, encoding, compat, is_verbose)
    116 
--> 117         return up.load()
    118     except:

~/anaconda3/envs/krakenex/lib/python3.6/pickle.py in load(self)
   1049                 assert isinstance(key, bytes_types)
-> 1050                 dispatch[key[0]](self)
   1051         except _Stop as stopinst:

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load_reduce(self)
     16 
---> 17     if type(args[0]) is type:
     18         n = args[0].__name__

IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     51             with open(path, 'rb') as fh:
---> 52                 return pkl.load(fh)
     53         except Exception:

pandas/tslib.pyx in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:9203)()

pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:25854)()

TypeError: Cannot convert input to Timestamp

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     56                 with open(path, 'rb') as fh:
---> 57                     return pc.load(fh, encoding=encoding, compat=False)
     58 

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load(fh, encoding, compat, is_verbose)
    116 
--> 117         return up.load()
    118     except:

~/anaconda3/envs/krakenex/lib/python3.6/pickle.py in load(self)
   1049                 assert isinstance(key, bytes_types)
-> 1050                 dispatch[key[0]](self)
   1051         except _Stop as stopinst:

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load_reduce(self)
     16 
---> 17     if type(args[0]) is type:
     18         n = args[0].__name__

IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
<ipython-input-1-ca0dd9ed40d3> in <module>()
      1 import pandas as pd
----> 2 perf = pd.read_pickle('./results.pickle') # read in perf DataFrame
      3 perf.head()

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in read_pickle(path)
     66     except:
     67         if PY3:
---> 68             return try_read(path, encoding='latin1')
     69         raise
     70 

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/io/pickle.py in try_read(path, encoding)
     60             except:
     61                 with open(path, 'rb') as fh:
---> 62                     return pc.load(fh, encoding=encoding, compat=True)
     63 
     64     try:

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load(fh, encoding, compat, is_verbose)
    115         up.is_verbose = is_verbose
    116 
--> 117         return up.load()
    118     except:
    119         raise

~/anaconda3/envs/krakenex/lib/python3.6/pickle.py in load(self)
   1048                     raise EOFError
   1049                 assert isinstance(key, bytes_types)
-> 1050                 dispatch[key[0]](self)
   1051         except _Stop as stopinst:
   1052             return stopinst.value

~/anaconda3/envs/krakenex/lib/python3.6/site-packages/pandas/compat/pickle_compat.py in load_reduce(self)
     15     func = stack[-1]
     16 
---> 17     if type(args[0]) is type:
     18         n = args[0].__name__
     19 

IndexError: tuple index out of range


Here is how you can reproduce this issue on your machine:

Reproduction Steps

  1. run zipline
  2. try to read the resulting pickle object

...

What steps have you taken to resolve this already?

tried to read the pickle object in other ways.

import pickle
with open('results.pickle', 'rb') as f:
      perf = pickle.load(f)

No luck:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-2d7ee866966d> in <module>()
      1 import pickle
      2 with open('results.pickle', 'rb') as f:
----> 3       perf = pickle.load(f)

pandas/tslib.pyx in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:9203)()

pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:25854)()

TypeError: Cannot convert input to Timestamp


...

Anything else?

...

Sincerely,
hugo

@freddiev4
Copy link
Contributor

freddiev4 commented Nov 30, 2017

Hi @hugokoopmans I'm thinking this is coming from compatibility between Python 3.6 and pandas.

Considering we don't yet have support/testing for Python 3.6, I'd suggest using a Python 3.5 environment. Can you try that and let me know if you can then run your algo and read the pickle file?

@hugokoopmans
Copy link
Author

Hi, after moving to python 3.5 i cannot even run the example algo.py

zipline run -f ./my_algorithm.py -s 2017-11-05 -e 2017-11-09 -o results.pickle --data-frequency minute -b poloniex
[2017-12-02 19:16:21.947437] 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:16:21.947697] 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 31958: invalid start byte

@freddiev4
Copy link
Contributor

@hugokoopmans luckily I've seen this error, here in #2036. I've opened #2031 to fix this issue.

If you follow the discussion in the issue I linked above, you'll see how you can solve your problem (by either waiting to use the latest zipline master, or using the branch I've opened to fix the problem)

@freddiev4
Copy link
Contributor

Closing this as this should be fixed in the latest release of zipline. Feel free to update to 1.2.0 with either:

pip install -U zipline

or

conda update zipline -c quantopian

If you're still experiencing issues, please reopen this or open a new issue 🙂

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

No branches or pull requests

2 participants