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 plotly.graph_objects fails with ipywidget version is <= 7.0.0 #2264

Closed
GaelVaroquaux opened this issue Mar 10, 2020 · 5 comments · Fixed by #2265
Closed

import plotly.graph_objects fails with ipywidget version is <= 7.0.0 #2264

GaelVaroquaux opened this issue Mar 10, 2020 · 5 comments · Fixed by #2265

Comments

@GaelVaroquaux
Copy link

Steps to reproduce:

$ python3.7 -m venv test
$ . test/bin/activate
(test) $ pip install plotly
(test) $ pip install ipywidgets==6
(test) $ python -c "import plotly.graph_objects"
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/varoquau/tmp/clean_venv/test/lib/python3.7/site-packages/plotly/graph_objects.py", line 2, in 
    from plotly.graph_objs import *
AttributeError: module 'plotly.graph_objs' has no attribute 'FigureWidget'

The problem is on line 100184 of plotly/graph_objs/init.py: the __all__.append("FigureWidget") that is a few lines below should be moved under the "if" clause.

Given that it is generated code, I don't know how to fix it, so I won't send a pull request.

@nicolaskruchten
Copy link
Contributor

Indeed, we don’t support anything below 7.2.

@nicolaskruchten
Copy link
Contributor

Sorry, that’s actually 7.2 for classic Notebook and 7.5 for Jupyter Lab, according to our docs at https://plot.ly/python/getting-started/

@nicolaskruchten
Copy link
Contributor

🤦‍♂ sorry, I misread your issue. Importing should not fail, clearly :)

@GaelVaroquaux
Copy link
Author

GaelVaroquaux commented Mar 11, 2020 via email

@nicolaskruchten
Copy link
Contributor

wondering if I was being an A-hole. :)

Nope that was me ;)

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

Successfully merging a pull request may close this issue.

2 participants