-
Notifications
You must be signed in to change notification settings - Fork 77
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
Exception 'PosixPath' object is not iterable when using the Herbie xarray method #44
Comments
this is addressed in PR #43 |
Thanks for reporting this @mattatwork26 and the pull request. |
Np, thanks for the package cfgrib 0.9.10.0 Just for clarity, the PR is not mine. |
This is interesting. I was not able to recreate the problem with the following:
from herbie.archive import Herbie
date = '2022-02-09T00:00'
fxx = 1
H = Herbie(date, model='hrrr', fxx=1)
ds = H.xarray('APCP:surface:0-1 hour')
ds I'll have to look more into this later. I like that the PR gets around this by converting the path back into a string, but it may be that the latest release of cfgrib has an issue opening pathlib.Path objects that needs to be reported. |
Ok, I was curious and had to see what was wrong. It does appear to be an issue with cfgrib. When I updated to 0.9.10.0, I got the same error. See ecmwf/cfgrib#282 On the Herbie side of things, for now, I updated the recommended environment.yml file to use cfgrib=0.9.9.1. - cfgrib=0.9.9.1 |
I can confirm that using version cfgrib 0.9.9.1 resolves my issue, thanks! |
Looks like this will be fixed in cfgrib 0.9.10.1 π |
Fixed in https://github.com/ecmwf/cfgrib/tree/0.9.10.1. |
There appears to be a bug in the Herbie.xarray method where the file path is not made into a string before calling cfgrib.open_datasets
Logs in question:
After changing
to
in the herbie.archive xarray method, the exception no longer occurs.
The text was updated successfully, but these errors were encountered: