-
Notifications
You must be signed in to change notification settings - Fork 43
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
Reading file fails with latest iris version #520
Comments
Here's the extract from the ESMVT testing of 3.9:
|
Confirmed solved: ESMValGroup/ESMValCore#2178 (comment) |
Sorry, the ESMValTool tests work indeed fine, but when I try to open the file mentioned above I get another error: >>> import iris
>>> path = "polar_stereo.grib2"
>>> cubes = iris.load(path)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/__init__.py", line 330, in load
return _load_collection(uris, constraints, callback).merged().cubes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/__init__.py", line 298, in _load_collection
result = _CubeFilterCollection.from_cubes(cubes, constraints)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/cube.py", line 95, in from_cubes
for cube in cubes:
^^^^^
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/__init__.py", line 279, in _generate_cubes
for cube in iris.io.load_files(part_names, callback, constraints):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/io/__init__.py", line 212, in load_files
handling_format_spec = FORMAT_AGENT.get_spec(os.path.basename(fn), fh)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/manuel/micromamba/envs/xxx/lib/python3.12/site-packages/iris/io/format_picker.py", line 150, in get_spec
raise ValueError(msg)
ValueError: No format specification could be found for the given buffer. Perhaps a plugin is missing or has not been loaded. File element cache:
{'UriProtocol()': 'file', 'LeadingLine()': "b'\\n'", 'MagicNumber(4, None)': '168430090', 'MagicNumber(8, None)': '723401728380779553', 'DataSourceObjectProtocol()': 'polar_stereo.grib2', 'FileExtension()': '.grib2', 'MagicNumber(100, None)': 'b\'\\n\\n\\n\\n\\n\\n<!DOCTYPE html>\\n<html\\n lang="en"\\...'} Loading the file with This is my environment:
|
Looks like something has downloaded an HTML file, not a (binary) GRIB file ?? |
Yes, you're 100% correct. That something would be me who didn't use |
Reading the file
iris_sample_data/sample_data/polar_stereo.grib2
with the latest iris 3.10 produces the following error for me:Here is my environment:
With iris 3.9, we also get an error, but a slightly different one: https://app.circleci.com/pipelines/github/ESMValGroup/ESMValCore/11527/workflows/2dea67e4-e4c9-4f8e-87fc-bb960e0b7849/jobs/48457/parallel-runs/0/steps/0-105. I did not test this locally though, so it could also be a problem of the CI machine.
The text was updated successfully, but these errors were encountered: