"no arguments in initialization list" runtime error
See original GitHub issueHi, I’m running into a cryptic error. My CRS in the geopandas dataframe seems to be properly set, however I cannot convert it to any other CRS.
>>> print(gdf_PLU.crs)
epsg:2193
>>>gdf_PLU.to_crs(epsg=4326)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-92-46b32e6c8012> in <module>()
1 print(gdf_PLU.crs)
----> 2 gdf_PLU.to_crs(epsg=4326)
~/anaconda3/envs/hthf/lib/python3.6/site-packages/geopandas/geodataframe.py in to_crs(self, crs, epsg, inplace)
384 else:
385 df = self.copy()
--> 386 geom = df.geometry.to_crs(crs=crs, epsg=epsg)
387 df.geometry = geom
388 df.crs = geom.crs
~/anaconda3/envs/hthf/lib/python3.6/site-packages/geopandas/geoseries.py in to_crs(self, crs, epsg)
283 except TypeError:
284 raise TypeError('Must set either crs or epsg for output.')
--> 285 proj_in = pyproj.Proj(self.crs, preserve_units=True)
286 proj_out = pyproj.Proj(crs, preserve_units=True)
287 project = partial(pyproj.transform, proj_in, proj_out)
~/anaconda3/envs/hthf/lib/python3.6/site-packages/pyproj/__init__.py in __new__(self, projparams, preserve_units, **kwargs)
356 # on case-insensitive filesystems).
357 projstring = projstring.replace('EPSG','epsg')
--> 358 return _proj.Proj.__new__(self, projstring)
359
360 def __call__(self, *args, **kw):
_proj.pyx in _proj.Proj.__cinit__ (_proj.c:1170)()
RuntimeError: b'no arguments in initialization list'
I can’t find this error message in any other issue. From similar issues it seems some data files could be missing (if so, how can I install them; I’m using the binary that is dragged in by conda-forge geopandas). Or is it something else?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:69 (13 by maintainers)
Top Results From Across the Web
RuntimeError: b'no arguments in initialization list'
1. I ran into an error on an Anaconda, Windows 10 installation in which the pyproj package's file datadir.py was pointing to the...
Read more >Why do I get error "Runtime: b'no arguments in initialization list ...
When I first bring in the feature class as a gpd dataframe, it shows no crs, so I use a function to find...
Read more >GeoPandas RunTimeError when attempting to re-project a ...
I am working through online documentation and have encountered a RuntimeError: b'no arguments in initialization list' from the below code.
Read more >Why do I get error "Runtime: b'no arguments in initialization list ...
GIS: Why do I get error " Runtime : b' no arguments in initialization list '" when running to_crs?Helpful? Please support me on...
Read more >RuntimeError: b'no arguments in initialization list' - DevPress
I'm trying to solve my issue in my own but I couldn't, I'm trying to run this code in every format you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
so I had the same problem. Using conda uninstall pyproj and then pip install pyproj worked to run the code
With pip version 2.2.1 is installed, so that workes, but conda uses Version 1.9.6.
But once I installed geopandas, conda would install pyproj with Version 1.9.6 again and then my code would also crashed again.
It worked, once I manually deleted the pyproj folder in anaconda\Lib\site-packages instead of using conda uninstall. And then use pip install pyproj.
Thanks a lot for all the helpful comments ! The solution of @rickantonais worked for me too: