Closed taoluo closed 8 years ago
@mickeydonkey you're getting this error because the commit you pulled included changes to Cython files, which need to be recompiled to take effect. The easiest way to do this if you're running from a github checkout is to run:
python setup.py build_ext --inplace
Before I ran pip install -e .
, I deleted all .so and .c files and the build subdirectory to make installation clean but it doesn't make any change. Anyway, your magic works for me, thank you! @ssanderson
Dear Zipline Maintainers,
Environment
Python 3.4.4
64
pip install e .
$ pip freeze
, almostly same as the testenv on travis CIalabaster==0.7.7 alembic==0.7.7 Babel==1.3 bcolz==0.12.1 blaze==0.9.1+168.g5622ba4 Bottleneck==1.0.0 certifi==2015.4.28 click==4.0 contextlib2==0.4.0 cookies==2.2.1 coverage==4.0.3 coveralls==1.1 cyordereddict==0.2.2 Cython==0.22.1 datashape==0.5.1+2.gf9461cd decorator==4.0.0 docopt==0.6.2 docutils==0.12 e==1.4.5 flake8==2.4.1 Flask==0.10.1 Flask-Cors==2.1.2 funcsigs==0.4 futures==3.0.3 intervaltree==2.1.0 itsdangerous==0.24 Jinja2==2.8 Logbook==0.12.5 Mako==1.0.4 Markdown==2.6.2 MarkupSafe==0.23 matplotlib==1.4.3 mccabe==0.3.1 mistune==0.7 mock==1.3.0 multipledispatch==0.4.8 networkx==1.9.1 nose==1.3.7 nose-ignore-docstring==0.2 nose-parameterized==0.5.0 nose-timer==0.5.0 numexpr==2.4.6 numpy==1.10.4 numpydoc==0.5 odo==0.4.2+8.ga548257 pandas==0.17.1 patsy==0.4.0 pbr==1.8.1 pep8==1.5.7 piprot==0.9.1 psutil==4.1.0 pyandoc==0.0.1 pyflakes==0.8.1 Pygments==2.1.3 pyparsing==2.0.3 python-dateutil==2.4.2 pytz==2015.4 requests==2.9.1 requests-futures==0.9.5 responses==0.4.0 scipy==0.16.1 six==1.10.0 snowballstemmer==1.2.1 sortedcontainers==1.4.4 Sphinx==1.3.4 sphinx-rtd-theme==0.1.9 SQLAlchemy==1.0.12 statsmodels==0.6.1 TA-Lib==0.4.9 termcolor==1.1.0 testfixtures==4.1.2 toolz==0.7.4 tornado==4.2.1 Werkzeug==0.11.4 xlrd==0.9.4 zipline==0.8.4+720.g080874c
Now that you know a little about me, let me tell you about the issue I am having:
Description of Issue
test_good_kwargs
andtest_without_kwargs
AttributeError: 'zipline.lib._float64window.AdjustedArrayWindow' object has no attribute 'seek'
Error Traceback (most recent call last): File "/home/luot/anaconda3/envs/zpenv/lib/python3.4/unittest/case.py", line 58, in testPartExecutor yield File "/home/luot/anaconda3/envs/zpenv/lib/python3.4/unittest/case.py", line 580, in run testMethod() File "/home/luot/code/zipline/tests/test_algorithm.py", line 1572, in test_good_kwargs test_algo.run(data_portal) File "/home/luot/code/zipline/zipline/algorithm.py", line 603, in run for perf in self.get_generator(): File "/home/luot/code/zipline/zipline/gens/tradesimulation.py", line 203, in transform every_bar(dt) File "/home/luot/code/zipline/zipline/gens/tradesimulation.py", line 138, in every_bar handle_data(algo, current_data, dt_to_use) File "/home/luot/code/zipline/zipline/utils/events.py", line 209, in handle_data context.trading_environment, File "/home/luot/code/zipline/zipline/utils/events.py", line 228, in handle_data self.callback(context, data) File "/home/luot/code/zipline/zipline/algorithm.py", line 406, in handle_data self._handle_data(self, data) File "", line 9, in handle_data
File "zipline/_protocol.pyx", line 45, in zipline._protocol.assert_keywords.call.assert_keywords_and_call (zipline/_protocol.c:1695)
File "zipline/_protocol.pyx", line 488, in zipline._protocol.BarData.history (zipline/_protocol.c:5893)
File "/home/luot/code/zipline/zipline/data/data_portal.py", line 1178, in get_history_window
"close")
File "/home/luot/code/zipline/zipline/data/data_portal.py", line 995, in _get_history_daily_window
eq_assets, days_for_window, end_dt, field_to_use
File "/home/luot/code/zipline/zipline/data/data_portal.py", line 1082, in _get_history_daily_window_equities
extra_slot=False
File "/home/luot/code/zipline/zipline/data/data_portal.py", line 1516, in _get_daily_window_for_sids
assets)
File "/home/luot/code/zipline/zipline/data/data_portal.py", line 1464, in _equity_daily_reader_arrays
field)
File "/home/luot/code/zipline/zipline/data/us_equity_loader.py", line 267, in history
return block.get(end_ix)
File "/home/luot/code/zipline/zipline/data/us_equity_loader.py", line 57, in get
self.current = around(self.window.seek(target), 3)
AttributeError: 'zipline.lib._float64window.AdjustedArrayWindow' object has no attribute 'seek'
Sincerely, Tao