Skip to content
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

TypeError: Timestamp subtraction must have the same timezones or no timezones #44

Closed
alexamici opened this issue Jan 1, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alexamici
Copy link
Contributor

test_cfgrib_cli_to_netcdf test fails with xarray==0.11.1 with:

>       assert res.exit_code == 0
E       AssertionError: assert -1 == 0
E        +  where -1 = <Result TypeError('Timestamp subtraction must have the same timezones or no timezones')>.exit_code
@alexamici alexamici self-assigned this Jan 1, 2019
@alexamici alexamici added the bug Something isn't working label Jan 1, 2019
@alexamici alexamici changed the title Timestamp subtraction must have the same timezones or no timezones TypeError: Timestamp subtraction must have the same timezones or no timezones Jan 1, 2019
@alexamici
Copy link
Contributor Author

Looks like it is an bug in xarray==0.11.1 it will probably be fixed in the next release. xref pydata/xarray#2649

@alexamici
Copy link
Contributor Author

The root of the problem is that we set explicit timezone in the units and some versions of xarray crash . The bug is fixed in xarray>=0.11.3, but I removed the +00:00 to maximise version support as CF specify that it is redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant