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

BUG: __repr__ crashes in IPython if ipywidget isn't installed #4154

Closed
neutrinoceros opened this issue Oct 8, 2022 · 3 comments · Fixed by #4155
Closed

BUG: __repr__ crashes in IPython if ipywidget isn't installed #4154

neutrinoceros opened this issue Oct 8, 2022 · 3 comments · Fixed by #4155
Labels

Comments

@neutrinoceros
Copy link
Member

ipython -c "import yt; ds=yt.load_sample('ChollaSimple'); ds.fields"

crashes with

ModuleNotFoundError: No module named 'ipywidgets'

Using the default python interpreter doesn't cause a crash

Note that I'm using the ChollaSimple sample dataset here only because it's small, but this bug isn't specific to the cholla frontend.

Originally posted by @neutrinoceros in #4054 (comment)

@neutrinoceros
Copy link
Member Author

I can't find a way to fix this while keeping ipywidget an optional dependency. Given that it's a very light weighted, well maintained, pure Python package, I think the reasonable fix is simply to promote it as a hard dependency

@matthewturk
Copy link
Member

matthewturk commented Oct 10, 2022 via email

@neutrinoceros
Copy link
Member Author

ATM it's not transitive, we directly import it.
We might be able to make it optional depending how we deal with #4054 though (ping @cphyc)

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

Successfully merging a pull request may close this issue.

2 participants