C:\Users\GW00321286\.conda\envs\python_39\python.exe E:\code-study\coda\test.py Traceback (most recent call last): File "E:\code-study\coda\test.py", line 13, in <module> c = gpd.GeoSeries(hits) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\geopandas\geoseries.py", line 208, in __init__ s = pd.Series(data, index=index, name=name, **kwargs) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\pandas\core\series.py", line 454, in __init__ data = com.maybe_iterable_to_list(data) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\pandas\core\common.py", line 308, in maybe_iterable_to_list return list(obj) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\prepared.py", line 32, in contains return self.context.contains(other) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\geometry\base.py", line 658, in contains return _maybe_unpack(shapely.contains(self, other)) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\decorators.py", line 77, in wrapped return func(*args, **kwargs) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\predicates.py", line 540, in contains return lib.contains(a, b, **kwargs) TypeError: One of the arguments is of incorrect type. Please provide only Geometry objects.
时间: 2023-08-27 11:22:14 浏览: 188
Python库 | conda_tools-0.1.zip
根据你提供的信息,这是一个 Python 报错信息,其中指出了发生错误的位置在 test.py 文件的第 13 行。错误是由于在 GeoPandas 库的 GeoSeries 对象中传入了错误的参数类型导致的。具体来说,错误信息指出传入了一个非几何对象作为参数,而 GeoSeries 对象只能接受几何对象作为参数。建议检查代码,确保在 GeoSeries 对象中只传入几何对象。
阅读全文