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? [email protected]
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.
Hi there,
If you're experiencing a problem with cufflinks code that's kept in a different repo at this time: https://github.com/santosjorge/cufflinks
Additionally, the error you're receiving looks like you haven't signed in with your Plotly account, that is necessary when plotting online. You can find more information about using Plotly to plot online vs offline on our getting started page: https://plot.ly/python/getting-started/
You can also find some examples of plotting offline with cufflinks here: https://plot.ly/ipython-notebooks/cufflinks/
Thanks @cldougl. I'll check out the links. I'm trying to use plotly offline and not online though.
Great, there is an example here: https://plot.ly/ipython-notebooks/cufflinks/#dataframes on how to plot offline using cufflinks
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=' ')
I had the same issue and installing plotly extension resolved this for me
https://github.com/jupyterlab/jupyter-renderers
my same problem was solved by
cf.go_offline()
instead of
cf.go_offline
Yes. I had the same problem. I can plot yesterday. not now anymore. But I fixed this by registering on plotly and then got the username and apikey. Just like what @BharatKoti said
py.offline.init_notebook_mode(connected=True) # for offline mode use
Please I have the same Problem. After installing plotly and cufflinks library. I used iplot to visualize the data. And it ran perfectly the first day but ever since then if I run the code again I get a blank space that could contain the image but without no image. Please someone should help me. I have been stuck for days
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.
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.
Thank you for your. Please I have tried d restart and clear output option from the kernel menu and I still get a blank page. I can see my plots. Please any other idea?
@chisom812 are you in JupyterLab or Classic Notebook?
Hi @nicolaskruchten,
Facing the same issue here. I'm using JupyterLab.
Tried with cufflinks==0.16 and plotly==3.10. Also cufflinks==0.17.0, plotly==4.2.1 and chart-studio==1.0.0.
No error message is shown, it expands the cell output with a blank space.
Tried to restart the kernel and also run: pip install jupyterlab==1.0 "ipywidgets>=7.5".
Any troubleshooting idea? Thanks!
I've managed to solve in Jupyter Lab by using the commands below:
$ jupyter labextension install @jupyterlab/plotly-extension
$ jupyter labextension list
$ jupyter lab build
It requires node installed: "brew install node" on mac
Yes: The JupyterLab extension is not optional and Plotly.py will not work unless it's installed :)
I'm going to go ahead and lock this issue now, as it's starting to be a bit of a pile-on... If anyone encounters any other problems, please create a new issue rather than tacking on your questions on an existing one :)
Most helpful comment
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=' ')