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

Misattribution of import errors #97

Open
bradezard131 opened this issue Apr 12, 2022 · 1 comment
Open

Misattribution of import errors #97

bradezard131 opened this issue Apr 12, 2022 · 1 comment

Comments

@bradezard131
Copy link

A failure to import IPython and matplotlib is falsely attributed to a a failure to import ipywidgets. Matplotlib is not a requirement for fastprogress and so this is an easy error to cause but requires source-code delving to debug.

if IN_NOTEBOOK:
try:
from IPython.display import clear_output, display, HTML
import matplotlib.pyplot as plt
except:
warn("Couldn't import ipywidgets properly, progress bar will use console behavior")
IN_NOTEBOOK = False

@seeM
Copy link
Member

seeM commented May 19, 2022

Just ran into this as well. In my case I was missing matplotlib. A simple fix would be to reword the error message. Nicer would be to enable as much functionality as possible without matplotlib if it doesn't exist. Not sure how much work that would need though.

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

No branches or pull requests

2 participants