PaulCoder
PaulCoder

Reputation: 27

Error crs when reading a shapefile with geopandas in jupyter

I´m trying to read a shapefile with geopandas

Quito_full =gpd.read_file('./shapefiles/administraciones_zonales.shp')

Simple as that but I keep getting the following error

CRSError: Invalid projection: epsg:32717: (Internal Proj Error: proj_create: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)

This are my versions

print(sys.version)
3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)]
import pyproj
print(pyproj.__version__)
2.6.1.post1
import geopandas
print(geopandas.__version__)
0.9.0

Is there anyway to fix this error, I have been trying everything!.

Upvotes: 0

Views: 658

Answers (1)

Rob Raymond
Rob Raymond

Reputation: 31146

from pathlib import Path
import geopandas as gpd

gdf = gpd.read_file(list(Path.home().joinpath("Downloads").glob("**/Administraciones_Zonales.shp"))[0])
gdf.to_crs("epsg:32717").explore()

versions

import pyproj, sys
print(gpd.__version__, pyproj.__version__, sys.version)
0.10.2 3.3.0 3.9.10 (main, Jan 15 2022, 11:48:00) 
[Clang 13.0.0 (clang-1300.0.29.3)]

Upvotes: 2

Related Questions