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

Import Error using XArrayBilinearResampler missing failed import of dask #453

Closed
benjaminesse opened this issue Sep 16, 2022 · 2 comments · Fixed by #454
Closed

Import Error using XArrayBilinearResampler missing failed import of dask #453

benjaminesse opened this issue Sep 16, 2022 · 2 comments · Fixed by #454

Comments

@benjaminesse
Copy link
Contributor

Code Sample, a minimal, complete, and verifiable piece of code

from pyresample import bilinear

Problem description

Importing bilinear without the required libraries raises the following warning:

UserWarning: XArray and/or zarr not found, XArrayBilinearResampler won't be available.

This occurs when xarray and zarr are installed (and confirmed with conda list).

The actual problem is missing dask, but this is missing from the warning, and so is hard to diagnose (without going into the pyresample files themselves).

Installing dask fixes the issue.

Would it be possible to change the warning message to something like:

UserWarning: XArray, dask and/or zarr not found, XArrayBilinearResampler won't be available.

Thanks!

Versions of Python, package at hand and relevant dependencies

Python 3.9.13 (Anaconda)
OS: Ubuntu

@djhoese
Copy link
Member

djhoese commented Sep 16, 2022

@benjaminesse Thanks for bringing this up. Your suggestion sounds like a good idea, but I'd prefer an oxford comma:

UserWarning: XArray, dask, and/or zarr not found, XArrayBilinearResampler won't be available.

How would you feel about making a pull request with a fix for this?

@benjaminesse
Copy link
Contributor Author

@djhoese pull request has been created with the Oxford comma included (I think, this was my first pull request so I hope I did everything right...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants