Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: b'no arguments in initialization list' #57

Closed
TobiasDK opened this issue Jan 11, 2019 · 4 comments
Closed

RuntimeError: b'no arguments in initialization list' #57

TobiasDK opened this issue Jan 11, 2019 · 4 comments

Comments

@TobiasDK
Copy link

Hi, I get this error with Windows 10, 64 bit, Anaconda 1.9.6, Spyder 3.3.2, Python 3.7.2, pysheds 0.2.3, pyproj 1.9.5.1. Please advise.

from pysheds.grid import Grid
Traceback (most recent call last):

  File "<ipython-input-16-c8708fc12346>", line 1, in <module>
    from pysheds.grid import Grid

  File "C:\ProgramData\Anaconda3\lib\site-packages\pysheds\grid.py", line 33, in <module>
    from pysheds.view import Raster

  File "C:\ProgramData\Anaconda3\lib\site-packages\pysheds\view.py", line 75, in <module>
    class BaseViewFinder():

  File "C:\ProgramData\Anaconda3\lib\site-packages\pysheds\view.py", line 77, in BaseViewFinder
    crs=pyproj.Proj('+init=epsg:4326'), y_coord_ix=0, x_coord_ix=1):

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyproj\__init__.py", line 358, in __new__
    return _proj.Proj.__new__(self, projstring)

  File "_proj.pyx", line 84, in _proj.Proj.__cinit__

RuntimeError: b'no arguments in initialization list'
@mdbartos
Copy link
Owner

Looks like pyproj wasn't properly installed, or possibly proj wasn't linked correctly.

You may be missing the actual projection data: pyproj4/pyproj#134

I normally use only pip, but I was able to get my pysheds install working on anaconda by first installing all dependencies manually, then installing pip within the anaconda environment, then installing pysheds using pip.

This tutorial also has installation instructions for windows with anaconda: https://www.hatarilabs.com/ih-en/watershed-and-stream-network-delimitation-with-python-and-pysheds-tutorial

I am also currently working on a conda-forge package: conda-forge/staged-recipes#7421

@mdbartos
Copy link
Owner

Greetings @TobiasDK

The conda forge recipe for pysheds is now ready. See if it fixes your issue:
https://github.com/conda-forge/pysheds-feedstock

@kse0202
Copy link

kse0202 commented Aug 10, 2020

import os

os.environ['PROJ_LIB']=r"C://[...path...]/Anaconda3/Library/share" 

set your 'proj_list' path
and you could check your proj list in that folder '.../Anaconda3/Library/share'

@mdbartos
Copy link
Owner

mdbartos commented Jan 3, 2022

Please reopen an issue if the problem persists.

@mdbartos mdbartos closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants