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

pyeccodes is not API compatible with eccodes. #204

Closed
pmav99 opened this issue Feb 25, 2021 · 0 comments · Fixed by #221
Closed

pyeccodes is not API compatible with eccodes. #204

pmav99 opened this issue Feb 25, 2021 · 0 comments · Fixed by #221

Comments

@pmav99
Copy link

pmav99 commented Feb 25, 2021

When you install pyeccodes without installing eccodes, you get the following exception

$ python -m cfgrib selfcheck
Traceback (most recent call last):
  File "/home/panos/.conda/envs/poseidon/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/panos/.conda/envs/poseidon/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/panos/.conda/envs/poseidon/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/panos/Prog/pyPoseidon/.venv/lib/python3.8/site-packages/cfgrib/__init__.py", line 19, in <module>
    from .cfmessage import CfMessage
  File "/home/panos/Prog/pyPoseidon/.venv/lib/python3.8/site-packages/cfgrib/cfmessage.py", line 29, in <module>
    from . import messages
  File "/home/panos/Prog/pyPoseidon/.venv/lib/python3.8/site-packages/cfgrib/messages.py", line 54, in <module>
    eccodes.codes_grib_multi_support_off()
AttributeError: module 'pyeccodes.compat' has no attribute 'codes_grib_multi_support_off'

I believe that the easiest way to resolve this is to remove the try:except ImportError block and just raise the ImportError

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

Successfully merging a pull request may close this issue.

1 participant