pygeos.strree还不能腌制
我正在尝试阅读具有GEO DTATFRAME的泡菜文件。 它在Colab上工作正常,直到我重新启动运行时间
test = 'derived edges.pkl'
testdf = pd.read_pickle(test)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-13-eb97f2da93db> in <module>()
1 test = 'derived edges.pkl'
----> 2 testdf = pd.read_pickle(test)
1 frames
/usr/local/lib/python3.7/dist-packages/pandas/io/pickle.py in read_pickle(filepath_or_buffer, compression, storage_options)
215 # RawIOBase, BufferedIOBase, TextIOBase, TextIOWrapper, mmap]";
216 # expected "IO[bytes]"
--> 217 return pickle.load(handles.handle) # type: ignore[arg-type]
218 except excs_to_catch:
219 # e.g.
/usr/local/lib/python3.7/dist-packages/geopandas/array.py in __setstate__(self, state)
422 def __setstate__(self, state):
423 if compat.USE_PYGEOS:
--> 424 geoms = pygeos.from_wkb(state[0])
425 self._crs = state[1]
426 self._sindex = None # pygeos.STRtree could not be pickled yet
KeyError: 0
I'm trying to read the pickle file that has a geo dtatframe.
It was working fine on colab until I restarted the runtime
test = 'derived edges.pkl'
testdf = pd.read_pickle(test)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-13-eb97f2da93db> in <module>()
1 test = 'derived edges.pkl'
----> 2 testdf = pd.read_pickle(test)
1 frames
/usr/local/lib/python3.7/dist-packages/pandas/io/pickle.py in read_pickle(filepath_or_buffer, compression, storage_options)
215 # RawIOBase, BufferedIOBase, TextIOBase, TextIOWrapper, mmap]";
216 # expected "IO[bytes]"
--> 217 return pickle.load(handles.handle) # type: ignore[arg-type]
218 except excs_to_catch:
219 # e.g.
/usr/local/lib/python3.7/dist-packages/geopandas/array.py in __setstate__(self, state)
422 def __setstate__(self, state):
423 if compat.USE_PYGEOS:
--> 424 geoms = pygeos.from_wkb(state[0])
425 self._crs = state[1]
426 self._sindex = None # pygeos.STRtree could not be pickled yet
KeyError: 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论