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

Error occured when bundling ALL stocks #207

Open
fimmugit opened this issue Nov 27, 2021 · 1 comment
Open

Error occured when bundling ALL stocks #207

fimmugit opened this issue Nov 27, 2021 · 1 comment

Comments

@fimmugit
Copy link

fimmugit commented Nov 27, 2021

(ZT36-live) C:\Users\itshuang\anaconda3\envs\ZT36-live\Lib\site-packages\zipline-trader>python zipline\data\bundles\alpaca_api.py
zipline\data\bundles\alpaca_api.py:272: UserWarning: Overwriting bundle with name 'alpaca_api'
def api_to_bundle(interval=['1m']):
zipline\data\bundles\alpaca_api.py:350: UserWarning: Overwriting bundle with name 'alpaca_api'
end_session=end_date
Merging daily equity files: [------------------------------------] 0%
Traceback (most recent call last):
File "zipline\data\bundles\alpaca_api.py", line 358, in
show_progress=True,
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\bundles\core.py", line 513, in ingest
pth.data_path([name, timestr], environ=environ),
File "zipline\data\bundles\alpaca_api.py", line 302, in ingest
daily_bar_writer.write(daily_data_generator(), assets=assets_to_sids.values(), show_progress=True)
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 617, in write
return self._write_internal(it, assets)
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 665, in _write_internal
for asset_id, table in iterator:
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 658, in iterator
for asset_id, table in iterator:
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\click_termui_impl.py", line 328, in generator
for rv in self.iter:
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 609, in
for sid, df in data
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 716, in _write_to_postgres
result = self._format_df_columns_and_index(data, sid)
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 716, in _write_to_postgres
result = self._format_df_columns_and_index(data, sid)
File "C:\Users\itshuang\anaconda3\envs\ZT36-live\lib\site-packages\zipline-trader\zipline\data\psql_daily_bars.py", line 806, in format_df_columns
and_index
data.index = data.index.normalize()
AttributeError: 'Index' object has no attribute 'normalize'

@fimmugit fimmugit changed the title ModuleNotFoundError: No module named 'zipline' Error occured when bundling ALL stocks Nov 27, 2021
@fimmugit
Copy link
Author

fimmugit commented Nov 27, 2021

This is related to issue #190 and I have made some suggestions to solve it. See #190

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