Comments (7)
Yes, I was referring to the pypi copy.
from eccodes-python.
I've just checked both the ZIP file and the TAR and they both contain the aforementioned grib file.
https://github.com/ecmwf/eccodes-python/archive/refs/tags/1.4.0.zip
https://github.com/ecmwf/eccodes-python/archive/refs/tags/1.4.0.tar.gz
Am I missing something?
from eccodes-python.
Looks like the one on the PyPI site:
https://pypi.org/project/eccodes/#files
does NOT have it. Thanks for pointing that out
from eccodes-python.
If I download the file and add the file manually to the tests/sample-data folder, than unfortunately it does not solve the problem. Ins tead I get the following errors:
______________________________ test_count_in_file ______________________________
def test_count_in_file():
with open(TEST_GRIB_DATA, "rb") as f:
> assert eccodes.codes_count_in_file(f) == 7
tests/test_eccodes.py:123:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gribapi/gribapi.py:432: in grib_count_in_file
GRIB_CHECK(err)
gribapi/gribapi.py:228: in GRIB_CHECK
errors.raise_grib_error(errid)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
errid = -64
def raise_grib_error(errid):
"""
Raise the GribInternalError corresponding to ``errid``.
"""
> raise ERROR_MAP[errid](errid)
E gribapi.errors.UnsupportedEditionError: Edition not supported.
gribapi/errors.py:382: UnsupportedEditionError
_____________________________ test_extract_offsets _____________________________
def test_extract_offsets():
offsets = eccodes.codes_extract_offsets(
TEST_GRIB_DATA, eccodes.CODES_PRODUCT_ANY, is_strict=True
)
> offsets_list = list(offsets)
tests/test_eccodes.py:158:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gribapi/gribapi.py:2478: in codes_extract_offsets
GRIB_CHECK(err)
gribapi/gribapi.py:228: in GRIB_CHECK
errors.raise_grib_error(errid)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
errid = -64
def raise_grib_error(errid):
"""
Raise the GribInternalError corresponding to ``errid``.
"""
> raise ERROR_MAP[errid](errid)
E gribapi.errors.UnsupportedEditionError: Edition not supported.
gribapi/errors.py:382: UnsupportedEditionError
----------------------------- Captured stderr call -----------------------------
ECCODES ERROR : codes_extract_offsets_malloc: Unable to count messages
=============================== warnings summary ===============================
../../../../usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233
/usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: flakes-ignore
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
../../../../usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233
/usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: mccabe-complexity
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
../../../../usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233
/usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: pep8ignore
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
../../../../usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233
/usr/lib/python3.10/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: pep8maxlinelength
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tests/test_eccodes.py::test_count_in_file - gribapi.errors.Unsupported...
FAILED tests/test_eccodes.py::test_extract_offsets - gribapi.errors.Unsupport...
=================== 2 failed, 58 passed, 4 warnings in 3.35s ===================
from eccodes-python.
The versions that I used are:
eccodes v2.24.0
(python) eccodes-1.4.0
python3.10
Fast bindings enabled.
OS: Fedora 36 (rawhide) in a mock environment.
from eccodes-python.
I have fixed the MANIFEST file to include the correct extension
from eccodes-python.
This has now been fixed (Version 1.4.1)
from eccodes-python.
Related Issues (20)
- Unexpected behavior if not all GRIB messages in a file are read HOT 1
- Can eccodes decode buffr radar image? HOT 6
- When the package ecmwflibs is available, ECCODES_DEFINITION_PATH is removed after `from gribapi import *` HOT 13
- open up discussion tab on github?
- Please use the warnings library for selfcheck HOT 6
- failing tests due to missing sample file. HOT 1
- read data from bytes object HOT 2
- Reading NCEP BUFR with Local Tables HOT 2
- Please support Python 3.10 (and 3.11) HOT 2
- Add support for `GRIB_TYPE_BYTES` to `codes_get_native_type` and `codes_get_array` HOT 4
- `codes_get` silently returns `None` for unsupported key types HOT 3
- Please support Python 3.11 HOT 1
- Latitude/longitude grid inconsistent behavior between GRIB1 and GRIB2 HOT 5
- Add method to access the result of the json bufr_dump HOT 5
- Update min_recommended_version for eccodes HOT 3
- Enabling thread safety using pip HOT 2
- aarch64 supports HOT 4
- 1.7.0: build fails with gcc error HOT 3
- Doesn't install on ubuntu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eccodes-python.