Uh oh!
There was an error while loading. Please reload this page.
Suggest installing dask when not discovered by ChunkManager - #7963
Suggest installing dask when not discovered by ChunkManager#7963TomNicholas wants to merge 2 commits into
Conversation
| possible_missing_package_name = type(chunked_arr).__module__.split(".")[0] | ||
| raise TypeError( | ||
| f"Could not find a Chunk Manager which recognises type {type(chunked_arr)}" | ||
| f"Could not find a Chunk Manager which recognises type {type(chunked_arr)}. Try installing the {possible_missing_package_name} package." |
There was a problem hiding this comment.
| f"Could not find a Chunk Manager which recognises type {type(chunked_arr)}. Try installing the{possible_missing_package_name} package." | |
| f"Could not find a Chunk Manager which recognises type {type(chunked_arr)}. Try searching for and installing a{possible_missing_package_name}_xarray package." |
? Since you could have cubed installed but not cubed-xarray
There was a problem hiding this comment.
Fair point, but then would that be more confusing if the problem is that the user doesn't have Dask installed? Because then it would point them towards a non-existent dask_xarray package...
TomNicholas
commented
Oct 14, 2023
This came up again in #8301. To be honest, given there are only 2 known chunkmanagers at the moment, maybe we should just special case the error message to tell the user exactly which package to install? |
dcherian
commented
Oct 15, 2023
Works for me! |
| ] | ||
| if not selected: | ||
| possible_missing_package_name = type(chunked_arr).__module__.split(".")[0] | ||
| raise TypeError( |
There was a problem hiding this comment.
considering that the error is actually caused by a missing package, could we consider
- using a more general exception, such as
ModuleNotFoundError, instead of the currentTypeError? - or implementing a custom exception specifically for this purpose?
TomNicholas
commented
Nov 8, 2024
Closing in favour of #9676 |
whats-new.rstNew functions/methods are listed inapi.rst