question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import error for latest version of cfgrib (0.9.9.0) on linux

See original GitHub issue

The lastest release of cfgrib cannot be imported on linux system. I think the same issue is creating error for xarray (https://github.com/pydata/xarray/issues/5138 ).

On windows system, however, everything seems to work fine.

import cfgrib ImportError Traceback (most recent call last) <ipython-input-3-30e689ead031> in <module> ----> 1 import cfgrib

~/miniconda3/lib/python3.8/site-packages/cfgrib/init.py in <module> 17 18 # cfgrib core API depends on the ECMWF ecCodes C-library only —> 19 from .cfmessage import CfMessage 20 from .dataset import Dataset, DatasetBuildError, open_file, open_fileindex 21 from .messages import FileStream, Message

~/miniconda3/lib/python3.8/site-packages/cfgrib/cfmessage.py in <module> 27 import numpy as np # type: ignore 28 —> 29 from . import messages 30 31 LOG = logging.getLogger(name)

~/miniconda3/lib/python3.8/site-packages/cfgrib/messages.py in <module> 26 27 import attr —> 28 import eccodes # type: ignore 29 import numpy as np # type: ignore 30

~/miniconda3/lib/python3.8/site-packages/eccodes/init.py in <module> 13 import sys 14 —> 15 from .eccodes import * 16 from .eccodes import version 17 from .eccodes import bindings_version

~/miniconda3/lib/python3.8/site-packages/eccodes/eccodes.py in <module> 10 # 11 # —> 12 from gribapi import version 13 from gribapi import bindings_version 14

~/miniconda3/lib/python3.8/site-packages/gribapi/init.py in <module> 11 # 12 —> 13 from .gribapi import * # noqa 14 from .gribapi import version 15 from .gribapi import bindings_version

~/miniconda3/lib/python3.8/site-packages/gribapi/gribapi.py in <module> 30 import numpy as np 31 —> 32 from .bindings import ENC, ffi, lib 33 from .bindings import version as bindings_version # noqa 34 from . import errors

~/miniconda3/lib/python3.8/site-packages/gribapi/bindings.py in <module> 27 28 try: —> 29 from ._bindings import ffi, lib 30 except ModuleNotFoundError: 31 ffi = cffi.FFI()

ImportError: /home/miniconda3/lib/python3.8/site-packages/gribapi/_bindings.cpython-38-x86_64-linux-gnu.so: undefined symbol: codes_bufr_key_is_header

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
bidhyacommented, Apr 12, 2021

Thanks @alexamici . Updating to eccodes>=2.20 seems to resolve this issue.

0reactions
alexamicicommented, Apr 13, 2021

The PR has been accepted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cfgrib · PyPI
cfgrib : A Python interface to map GRIB files to the NetCDF Common Data Model following ... key present and new value is...
Read more >
Unable to import cfgrib - netcdf - Stack Overflow
Whenever I try importing cfgrib it gives me runtime error that it could not load ecCodes library import cfgrib.
Read more >
cfgrib: easy and efficient grib file access in xarray - ecmwf
$ python -m cfgrib selfcheck. Found: ecCodes v2.7.0. Your system is ready. $ pip install xarray>=0.10.9. [ GitPitch @ github ...
Read more >
Bug#993631: marked as done (cfgrib FTBFS: test failures)
Source: cfgrib Version: 0.9.9.0-1 Severity: serious Tags: ftbfs ... ___ ImportError while importing test module ...
Read more >
Cfgrib - :: Anaconda.org
conda-forge / packages / cfgrib 0.9.10.0. 1 · License: Apache-2.0 · 330952 total downloads · Last upload: 26 days and 11 hours ago ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found