Local offline mode does not work in Jupyter Notebook 5
See original GitHub issueHi!
After upgrading jupyter notebook to v5 -
when using plotly with init_notebook_mode(connected=False)
(which is the default flag), with each call to iplot an exception is raised
Uncaught Error: Script error for "plotly"
http://requirejs.org/docs/errors.html#scripterror
at makeError (require.js:165)
at HTMLScriptElement.onScriptError (require.js:1732)
The canvas is still drawn but it’s white. when reverting to notebook v4.3.2, plotly works again.
Note that if using connected=True (which will fetch plotly.js from the CDN) it will work.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Installing Jupyter Notebook (Offline mode) - IBM
Use the following steps to install Jupyter Notebooks in an offline environment. ... Do not change to /usr/local/bin/pip3.5. Compress the offline ...
Read more >does jupyter notebook works offline in windows, if so then how?
Yes, you don't need an internet connection to run jupyter notebook because it runs on the localhost. after you install anaconda you will...
Read more >Frequently Asked Questions — FiftyOne 0.18.0 documentation
Can I use FiftyOne in a remote notebook? Yes! It is possible to work with a Jupyter notebook in your local browser that...
Read more >Launching SageMath - Installation Guide
Otherwise you are strongly advised to create shortcuts for Sage as indicated at ... To start a Jupyter Notebook instead of a Sage...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@averri I ran your code with the same library versions and I got an empty plot too. It displays the plot in jupyter notebook 5.0.1 only if you import
download_plotlyjs
:I have been using plotly in offline mode from within Jupyter notebook. I have been getting the plots. But suddenly today I see that I am either getting a blank output (no error but no plot as well) for the following code:
import plotly.offline as pltly import plotly.graph_objs as go import numpy as np
N = 500 random_x = np.linspace(0, 1, N) random_y = np.random.randn(N)
Create a trace
trace = go.Scatter( x = random_x, y = random_y ) data = [trace] pltly.iplot(data, filename=‘basic-line’)
Or showing this error: “Aw, snap! We didn’t get a username with your request. Don’t have an account? https://plot.ly/api_signup Questions? accounts@plot.ly” for similar codes like the following:
#Linechart cf.datagen.lines().iplot(kind=‘scatter’,xTitle=‘Dates’,yTitle=‘Returns’,title=‘Cufflinks - Line Chart’)
import plotly.offline as pltly import cufflinks as cf import pandas as pd import numpy as np df = pd.DataFrame(np.random.rand(10, 4), columns=[‘a’, ‘b’, ‘c’, ‘d’]) df.iplot(kind=‘area’, fill=True, filename=‘cufflinks/stacked-area’)
jupyter notebook version= 5.7.4 plotly = 3.7.0