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

UX: add hints to YTUnidentifiedDataType #4274

Closed
neutrinoceros opened this issue Dec 29, 2022 · 0 comments · Fixed by #4275
Closed

UX: add hints to YTUnidentifiedDataType #4274

neutrinoceros opened this issue Dec 29, 2022 · 0 comments · Fixed by #4275
Labels
enhancement Making something better UX user-experience
Milestone

Comments

@neutrinoceros
Copy link
Member

neutrinoceros commented Dec 29, 2022

Bug report

Bug summary

YTUnidentifiedDataType is the error ones get from yt.load(...) when no "valid" frontend is found. Currently the error message doesn't give much guidance, but in many a case it can be fixed by either:

  • installing missing requirements (most often h5py), because many implementations of Dataset._is_valid() just return False when getting an import error.
  • upgrading yt (if the current version is older than the first one to have the required frontend)

It would be helpful to acknowledge these solutions in the message. Ideally, I think we should avoid importing stuff in _is_valid methods, but that calls for a broad refactor with a high chance of breaking someone's workflow, so I think it's a little late to do that.

I note that #4272 is helpful here because it gathers the important data (frontend VS requirements mapping) in one place (pyproject.toml).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making something better UX user-experience
Projects
None yet
1 participant