You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear all,
in the last time i often receive the following Error:
File "/app/src/modules/decoder/grib_decoder.py", line 18, in __init__
self._data = xarray_store.open_dataset(str(file_name))
File "/usr/local/lib/python3.6/site-packages/cfgrib/xarray_store.py", line 47, in open_dataset
store = cfgrib_.CfGribDataStore(path, **real_backend_kwargs)
File "/usr/local/lib/python3.6/site-packages/cfgrib/cfgrib_.py", line 78, in __init__
self.ds = cfgrib.open_file(filename, mode='r', **backend_kwargs)
File "/usr/local/lib/python3.6/site-packages/cfgrib/dataset.py", line 452, in open_file
return Dataset.from_path(path, **kwargs)
File "/usr/local/lib/python3.6/site-packages/cfgrib/dataset.py", line 447, in from_path
return cls(*build_dataset_components(stream, **flavour_kwargs))
File "/usr/local/lib/python3.6/site-packages/cfgrib/dataset.py", line 395, in build_dataset_components
index = stream.index(ALL_KEYS).subindex(filter_by_keys)
File "/usr/local/lib/python3.6/site-packages/cfgrib/messages.py", line 211, in index
return FileIndex.from_filestream(filestream=self, index_keys=index_keys)
File "/usr/local/lib/python3.6/site-packages/cfgrib/messages.py", line 228, in from_filestream
schema = make_message_schema(filestream.first(), index_keys)
File "/usr/local/lib/python3.6/site-packages/cfgrib/messages.py", line 208, in first
return next(iter(self))
StopIteration
@meteoDaniel I think you attempted to open a file with no valid GRIB message in it and I agree that the error is totally confusing. I'm considering it a bug and fixing it in master. Thanks for reporting!
Dear all,
in the last time i often receive the following Error:
Why cfgrib raise StopIteration Error? Whats wrong?
The text was updated successfully, but these errors were encountered: