plotly.py: Plotly and cufflinks are not working with jupyter notebook

Hello,

I have used plotyly in my jupyter notebook before today and it worked just fine. But now, it is no longer working Here is the code which I ran to launch plotly and cufflinks in my jupyter notebook: import plotly.plotly as py from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot import cufflinks as cf cf.go_offline init_notebook_mode(connected=True)

And when I tried to run this code:

train['Fare'].iplot(kind = 'hist', bins = 30) ,

it gave this error:

Aw, snap! We don't have an account for ''. Want to try again? You can authenticate with your email address or username. Sign in is not case sensitive.

Don't have an account? plot.ly

Questions? support@plot.ly

PlotlyError: Because you didn't supply a 'file_id' in the call, we're assuming you're trying to snag a figure from a url. You supplied the url, '', we expected it to start with 'https://plot.ly'. Run help on this function for more information.

I have tried every possible way I know to fix this. Any other useful suggestion will be appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 16 (6 by maintainers)

Most upvoted comments

step 1 : Create an account on Plotly Step 2 : Generate an API, which is under settings Step 3: Please insert your username and api key and run the following code import plotly plotly.tools.set_credentials_file(username=’ ‘, api_key=’ ')

my same problem was solved by cf.go_offline() instead of cf.go_offline

So Cufflinks v0.16 and Plotly v4 aren’t compatible with each other. If you want to use Cufflinks v0.16 you’ll have to downgrade to Plotly v3.10.

Cufflinks v0.17 is coming out soon and will be compatible with Plotly v4.

If you’re seeing blank outputs, the fix will depend on whether you’re using JupyterLab or Jupyter Notebook.

If you’re using JupyterLab, please ensure you have the correct version of the plotly extensions installed as per https://plot.ly/python/getting-started/#jupyterlab-support-python-35

If you’re using Jupyter Notebook, things sometimes can get out of sync, and can be fixed by using the Restart & Clear Output option from the Kernel menu.