plotly.py: plotly.plotly import error message
Should have caught this before RC1, sorry… This message:
I think should provide a little more context and say something like:
The plotly.plotly module is deprecated.
To create figures using the Chart Studio service, please install the chart-studio package and use the chart_studio.plotly module instead.
To create and display figures locally, please use the plotly.offline module which is based on the new version 4 rendering framework.
Basically give people more information and a stronger hint about using offline (which is arguably the smallest change to their code that lets them get on with their day)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 25 (7 by maintainers)
@anki-code here is what worked for me: Downgraded from the latest plotly version
pip install plotly==3.10.0
Hi @JobCollins, when using
plotly
version 4 (released two days ago) and error message here is the expected behavior. See https://plot.ly/python/v4-migration/ for the version 4 migration guide, or downgrade your plotly version to 3.10.This issue is concerned with adding more information to the error message.
Hi @zShores, thanks for letting us know. The stack trace you’re getting is a bit confusing as it looks like
import chart_studio.plotly as py
is resulting in the import ofplotly.plotly
, which shouldn’t be happening. Could you try fully uninstalling and reinstalling theplotly
andchart-studio
packages to see if that makes a difference?Hello Jonmease, I have the exact same issue described here and I attempted your solution but unfortunately it does not seem to be working for me.
Do you have any other suggestion for something I can try? I accidentally updated plotly, which started causing issues and so far attempting to revert it back did not fix it. Best B
@Zaid0 this is no longer necessary: if you install
cufflinks
version 0.17 it’s compatible withplotly
4.2+thanks @JobCollins it worked for me
As one of Plotly fan, I am not happy at all. Everything crash each other.
Hi @anki-code, the documentation page you linked to (https://plot.ly/pandas/line-charts/) is written for version 3 only (See purple text box at the top). So downgrading to version 3 is what you would need to do to follow this example.
The error you’re getting indicates that there’s something corrupt in the installation. Try uninstalling and reinstalling the
plotly
package. Or better yet, create a new virtual environment.@JobCollins after downgrade to
3.10.0
I’ve got a new error for “Pandas Basic Line Plot” (https://plot.ly/pandas/line-charts/) :