I'm trying to import a shape file and change its crs in order to get a map with the correct projection.
map_sh = gpd.read_file(r'C:\PATH\VG250_Gemeindegrenzen_2018.shp')
map_sh = map_sh.to_crs({'init' :'epsg:25832'})
When I try executing it, I will get the following error:
RuntimeError Traceback (most recent call last)
<ipython-input-7-8354f57e24ce> in <module>
----> 1 map_sh = map_sh.to_crs({'init' :'epsg:25832'})
~\AppData\Local\Continuum\miniconda3\lib\site-packages\geopandas\geodataframe.py in to_crs(self, crs, epsg, inplace)
441 else:
442 df = self.copy()
--> 443 geom = df.geometry.to_crs(crs=crs, epsg=epsg)
444 df.geometry = geom
445 df.crs = geom.crs
~\AppData\Local\Continuum\miniconda3\lib\site-packages\geopandas\geoseries.py in to_crs(self, crs, epsg)
302 except TypeError:
303 raise TypeError('Must set either crs or epsg for output.')
--> 304 proj_in = pyproj.Proj(self.crs, preserve_units=True)
305 proj_out = pyproj.Proj(crs, preserve_units=True)
306 project = partial(pyproj.transform, proj_in, proj_out)
~\AppData\Local\Continuum\miniconda3\lib\site-packages\pyproj\__init__.py in __new__(self, projparams, preserve_units, **kwargs)
360 # on case-insensitive filesystems).
361 projstring = projstring.replace('EPSG','epsg')
--> 362 return _proj.Proj.__new__(self, projstring)
363
364 def __call__(self, *args, **kw):
_proj.pyx in _proj.Proj.__cinit__()
RuntimeError: b'no arguments in initialization list'
I already had this specific error and could solve it by updating pyproj to version 2.2.1, but since yesterday I get the same error again.
What could have changed, that from one day to another the code is running into errors? How can I check which version of pyproj my code is running? I only know the command:
pip freeze