Problem ingesting HK exchange data as bundles: AttributeError: 'int' object has no attribute 'upper'

calling this ingest_bundle(history_db="demo-stocks-1d") in the notebook causes the following error.

2018-02-04 01:29:55 quantrocket.zipline: ERROR     tuple_series = equities_output['symbol'].apply(split_delimited_symbol)
2018-02-04 01:29:55 quantrocket.zipline: ERROR   File "/opt/conda/lib/python3.5/site-packages/pandas/core/series.py", line 2220, in apply
2018-02-04 01:29:55 quantrocket.zipline: ERROR     mapped = lib.map_infer(values, f, convert=convert_dtype)
2018-02-04 01:29:55 quantrocket.zipline: ERROR   File "pandas/src/inference.pyx", line 1088, in pandas.lib.map_infer (pandas/lib.c:62658)
2018-02-04 01:29:55 quantrocket.zipline: ERROR   File "/opt/conda/lib/python3.5/site-packages/zipline/assets/asset_writer.py", line 144, in split_delimited_symbol
2018-02-04 01:29:55 quantrocket.zipline: ERROR     symbol = symbol.upper()
2018-02-04 01:29:55 quantrocket.zipline: ERROR AttributeError: 'int' object has no attribute 'upper'
2018-02-04 01:29:55 quantrocket.zipline: ERROR 

Stock symbol in SEHK is cast as integer.

Thanks for reporting. This issue is fixed in the latest image. Please update your YAML file like this:

  zipline:
    image: 'quantrocket/zipline:1.1.1.8'

Then redeploy zipline:

docker-compose -p quantrocket up -d zipline
1 Like