Can't load geojson file using geopandas

2k Views Asked by At

I am trying to load geojson file into Jupyter notebook, using

import geopandas as gpd

country = gpd.read_file(r"‪path-to-file\svn_border.geojson")

It returns following error:

CPLE_OpenFailedError: '‪‪path-to-file\svn_border.geojson' does not exist in the file system, and is not recognized as a supported dataset name.

fiona\ogrext.pyx in fiona.ogrext.Session.start()

fiona\_shim.pyx in fiona._shim.gdal_open_vector()

DriverError: '‪‪path-to-file\svn_border.geojson' does not exist in the file system, and is not recognized as a supported dataset name.

I am using Python 3.6.8, Fiona 1.18, GDAL 3.1.4. Even when I tried to upload content of geojson file as json format, it gives the same error.

I have been working on the same error for several days now, could anyone point my mistake?

Edit: After trying to validate geojson files which I have, it turned out that they are corrupt. I have used an example geojson file, which worked fine.

0

There are 0 best solutions below