man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.05k stars 583 forks source link

Handle uninitialized cache object #892

Closed shashank88 closed 3 years ago

shashank88 commented 3 years ago

If _cache is not initialized - I have seen this in some contexts with forking involved - just return the uncached list_libraries.

luocy16 commented 3 years ago

What is this bug?

File "create_dataset_new.py", line 100, in add_one_stock_daily_data_wrapper error_index_list = add_one_stock_daily_data(filepath, type, exchange_place, arc, date) File "create_dataset_new.py", line 86, in add_one_stock_daily_data lib.update(symbol, df, chunk_size="D") File "/home/shared_user/anaconda3/envs/luocy2/lib/python3.8/site-packages/arctic/chunkstore/chunkstore.py", line 567, in update self.update(sym, item, metadata=metadata, combine_method=lambda old, new: new, chunk_range=chunk_range, audit=audit) File "/home/shared_user/anaconda3/envs/luocy2/lib/python3.8/site-packages/arctic/chunkstore/chunkstore.py", line 433, in update df = self.read(symbol, chunk_range=chunker.to_range(start, end), filter_data=False) File "/home/shared_user/anaconda3/envs/luocy2/lib/python3.8/site-packages/arctic/chunkstore/chunkstore.py", line 287, in read return deser(chunks[symbol[0]], kwargs) if skip_filter else chunker.filter(deser(chunks[symbol[0]], kwargs), chunk_range) File "/home/shared_user/anaconda3/envs/luocy2/lib/python3.8/site-packages/arctic/serialization/numpy_arrays.py", line 220, in deserialize index = INDEX in meta TypeError: argument of type 'NoneType' is not iterable