Lan*_*ter 16 python pytables pandas hdf
跑步时
pd.read_hdf('myfile.h5')
我收到以下回溯错误:
[[......一些较长的追溯]]
read_array中的〜/ .local/lib/python3.6/site-packages/pandas/io/pytables.py(self,key,start,stop)2487 2488 if isinstance(node,tables.VLArray): - > 2489 ret = node [0] [start:stop] 2490 else:2491 dtype = getattr(attrs,'value_type',None)
getitem中的〜/ .local/lib/python3.6/site-packages/tables / vlarray.py(self,key)
阅读中的〜/ .local/lib/python3.6/site-packages/tables/vlarray.py(自我,开始,停止,步骤)
tables.hdf5extension.VLArray._read_array()中的tables/hdf5extension.pyx
ValueError:无法将WRITEABLE标志设置为此数组的True
不知道发生了什么.我已经尝试重新安装tables,pandas一切基本上,但不想阅读它.
rke*_*erm 17
将 PyTables 升级到版本 > 3.5.1 应该可以解决这个问题。
pip install --upgrade tables
Run Code Online (Sandbox Code Playgroud)
小智 15
你在使用numpy 1.16吗?它与pytables的最新版本不兼容(请参阅https://github.com/PyTables/PyTables/blob/v3.4.4/tables/hdf5extension.pyx#L2155),但pytables团队尚未发布固定版本:https ://github.com/PyTables/PyTables/issues/719
我找到解决这个问题的唯一方法是降级numpy.