Все,
Я получил следующую ошибку при попытке импортировать файл States.geojson, как описано на этой странице https://www.twilio.com/en-us/blog/geosp ... on-geojson -geopandas-html. Думаю, что этот файл входит в число предустановленных файлов с геопандами.
Я использую геопанды версии 0.14.4
Traceback (most recent call last):
File fiona/ogrext.pyx:130 in fiona.ogrext.gdal_open_vector
File fiona/ogrext.pyx:134 in fiona.ogrext.gdal_open_vector
File fiona/_err.pyx:375 in fiona._err.StackChecker.exc_wrap_pointer
CPLE_OpenFailedError: states.geojson: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Cell In[1], line 2
states = gpd.read_file('states.geojson') # built in-file
File ~/anaconda3/lib/python3.11/site-packages/geopandas/io/file.py:289 in _read_file
return _read_file_fiona(
File ~/anaconda3/lib/python3.11/site-packages/geopandas/io/file.py:315 in _read_file_fiona
with reader(path_or_bytes, **kwargs) as features:
File ~/anaconda3/lib/python3.11/site-packages/fiona/env.py:457 in wrapper
return f(*args, **kwds)
File ~/anaconda3/lib/python3.11/site-packages/fiona/__init__.py:342 in open
colxn = Collection(
File ~/anaconda3/lib/python3.11/site-packages/fiona/collection.py:226 in __init__
self.session.start(self, **kwargs)
File fiona/ogrext.pyx:876 in fiona.ogrext.Session.start
File fiona/ogrext.pyx:136 in fiona.ogrext.gdal_open_vector
DriverError: Failed to open dataset (flags=68): states.geojson
Все, Я получил следующую ошибку при попытке импортировать файл States.geojson, как описано на этой странице https://www.twilio.com/en-us/blog/geospatial-anaанализ-python-geojson -geopandas-html. Думаю, что этот файл входит в число предустановленных файлов с геопандами. Я использую геопанды версии 0.14.4 [code]import geopandas as gpd states = gpd.read_file('states.geojson') [/code] Вот ошибка [code]Traceback (most recent call last):
File fiona/ogrext.pyx:130 in fiona.ogrext.gdal_open_vector
File fiona/ogrext.pyx:134 in fiona.ogrext.gdal_open_vector
File fiona/_err.pyx:375 in fiona._err.StackChecker.exc_wrap_pointer
CPLE_OpenFailedError: states.geojson: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Cell In[1], line 2 states = gpd.read_file('states.geojson') # built in-file
File ~/anaconda3/lib/python3.11/site-packages/geopandas/io/file.py:289 in _read_file return _read_file_fiona(
File ~/anaconda3/lib/python3.11/site-packages/geopandas/io/file.py:315 in _read_file_fiona with reader(path_or_bytes, **kwargs) as features:
File ~/anaconda3/lib/python3.11/site-packages/fiona/env.py:457 in wrapper return f(*args, **kwds)
File ~/anaconda3/lib/python3.11/site-packages/fiona/__init__.py:342 in open colxn = Collection(
File ~/anaconda3/lib/python3.11/site-packages/fiona/collection.py:226 in __init__ self.session.start(self, **kwargs)
File fiona/ogrext.pyx:876 in fiona.ogrext.Session.start
File fiona/ogrext.pyx:136 in fiona.ogrext.gdal_open_vector
DriverError: Failed to open dataset (flags=68): states.geojson [/code] Спасибо