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

Merely importing plotly 3.6.0 causes error #1421

Closed
zeluspudding opened this issue Feb 2, 2019 · 5 comments
Closed

Merely importing plotly 3.6.0 causes error #1421

zeluspudding opened this issue Feb 2, 2019 · 5 comments
Labels
bug something broken

Comments

@zeluspudding
Copy link

I've got an issue with plotly version 3.6.0

Running import plotly gives me the following error in Spyder 3.2.4:

Traceback (most recent call last):

  File "<ipython-input-13-5fb02038c35f>", line 1, in <module>
    import plotly

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\__init__.py", line 31, in <module>
    from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\plotly\__init__.py", line 10, in <module>
    from . plotly import (

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\plotly\plotly.py", line 35, in <module>
    from plotly.graph_objs import Scatter

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\graph_objs\__init__.py", line 82, in <module>
    from ._figurewidget import FigureWidget

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\graph_objs\_figurewidget.py", line 12, in <module>
    class FigureWidget(BaseFigureWidget):

TypeError: function() argument 1 must be code, not str

Traceback (most recent call last):

  File "<ipython-input-13-5fb02038c35f>", line 1, in <module>
    import plotly

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\__init__.py", line 31, in <module>
    from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\plotly\__init__.py", line 10, in <module>
    from . plotly import (

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\plotly\plotly.py", line 35, in <module>
    from plotly.graph_objs import Scatter

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\graph_objs\__init__.py", line 82, in <module>
    from ._figurewidget import FigureWidget

  File "C:\Users\Artemis\Anaconda3\lib\site-packages\plotly\graph_objs\_figurewidget.py", line 12, in <module>
    class FigureWidget(BaseFigureWidget):

TypeError: function() argument 1 must be code, not str
@jonmmease
Copy link
Contributor

Hi @zeluspudding,

Thanks for the report! Unfortunately I can't reproduce this. Could you include the versions of python and ipywidgets that you have installed? My suspicion is that it might have something to do with #1417.

Thanks!

@jonmmease jonmmease added the bug something broken label Feb 2, 2019
@chornbaker
Copy link

I'm having the same problem as @zeluspudding, attempting to import plotly in a Zeppelin notebook and getting the exact same error.

I'm running Python 3.6.1 and ipywidgets 6.0.0

@jonmmease
Copy link
Contributor

Thanks for the info @chornbaker.

Could you please either uninstall ipywidgets, or upgrade to ipywidgets >= 7.2 and let us know if that takes care of the problem? Thanks!

@jonmmease
Copy link
Contributor

Closed on the assumption that this is a problem with having ipywidgets v6 installed, which has been taken care of in #1425.

Please comment if removing ipywidgets or upgrading to v7 doesn't fix the problem for you.

@zeluspudding
Copy link
Author

zeluspudding commented Feb 4, 2019

Sorry for the delay - was away from computer. My version is Python 3.5.5 | packaged by conda-forge | (default, Jul 24 2018, 01:52:17) [MSC v.1900 64 bit (AMD64)] and ipywidgets 4.1.1

I downgraded to plotly 3.4.2 (since that was what your documentation was using) and that solved the problem. Thanks guys!

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

No branches or pull requests

3 participants