You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for opening this, @marugari . This offline behavior is what I was wondering about too. When I try the recommended fix, I am unable to render dcc.Graph() objects. Is this expected behavior when running offline?
I don't get an error in the browser or the console running dash. I just don't get a page load. At the browser level, the HTML just renders "Loading..." and never gets passed that (waited for quite a while).
No, I'm not. I'm just running the first tutorial (here) which does not import anything specifically from plotly. I will try your import statement and report back.
Oh that won't help then, as they are generating the figure directly in dash. The offline library I referenced only helps when the graph is being generated in a callback. Disregard my suggestion.
Okay, good to know. That means it's something on my end. Maybe my browser (which is up-to-date Chrome)? But, good to know the general concept should be working.
Hm.. I'm not sure what it could be. I have down some browser testing on these apps. If open up the Chrome Dev Tools, are there any red errors printed out?
@chriddyp : curiously, the script loads under some conditions today. Not sure what that means; I haven't rebooted in the meantime. 🤷♂️ When it doesn't load, here's the devtools view:
Thanks for reporting @sbowman-mitre ! I've actually seen this before. In this case, the flask server is having trouble serving the large javascript bundle (1MB or larger) from the file system. I've only seen this happen on Windows machines and servers.
I'm not yet sure how to resolve this or make this more stable.
Activity
pl77 commentedon Jun 26, 2017
Did you try the suggestion at the bottom of the user guide?
https://plot.ly/dash/external-resources
sbowman-mitre commentedon Jun 26, 2017
Thanks for opening this, @marugari . This offline behavior is what I was wondering about too. When I try the recommended fix, I am unable to render dcc.Graph() objects. Is this expected behavior when running offline?
jackluo commentedon Jun 26, 2017
Graph() objects should be rendered offline. Can you post the errors you are having?
sbowman-mitre commentedon Jun 26, 2017
I don't get an error in the browser or the console running dash. I just don't get a page load. At the browser level, the HTML just renders "Loading..." and never gets passed that (waited for quite a while).
pl77 commentedon Jun 26, 2017
I'm going from memory as I am not running dash offline now, but are you importing plot from plotly.offline?
for example:
from plotly.offline import download_plotlyjs, plototherwise it'll still try and get the plotlyjs file from the CDN.
sbowman-mitre commentedon Jun 26, 2017
No, I'm not. I'm just running the first tutorial (here) which does not import anything specifically from plotly. I will try your import statement and report back.
pl77 commentedon Jun 26, 2017
Oh that won't help then, as they are generating the figure directly in dash. The offline library I referenced only helps when the graph is being generated in a callback. Disregard my suggestion.
chriddyp commentedon Jun 26, 2017
That's it exactly. The
dcc.Graphobjects should be rendered offline too.Here is a standalone example that works for me with my wifi turned off:
@sbowman-mitre - Could you try this example and see if it works?
sbowman-mitre commentedon Jun 26, 2017
Yes, your example does render for me. That's good news!
Yes, I had added those lines to my script and it did not render. Here's the entirety of my script:
marugari commentedon Jun 27, 2017
My thanks to @pl77 and @chriddyp.
I think "Rendering dash apps offline"(https://plot.ly/dash/external-resources) should be independent.
chriddyp commentedon Jun 27, 2017
Great, thanks! @sbowman-mitre - that script that you posted actually works for me OK:

sbowman-mitre commentedon Jun 27, 2017
Okay, good to know. That means it's something on my end. Maybe my browser (which is up-to-date Chrome)? But, good to know the general concept should be working.
chriddyp commentedon Jun 27, 2017
Hm.. I'm not sure what it could be. I have down some browser testing on these apps. If open up the Chrome Dev Tools, are there any red errors printed out?
sbowman-mitre commentedon Jun 27, 2017
@chriddyp : curiously, the script loads under some conditions today. Not sure what that means; I haven't rebooted in the meantime. 🤷♂️ When it doesn't load, here's the devtools view:

chriddyp commentedon Jun 27, 2017
Thanks for reporting @sbowman-mitre ! I've actually seen this before. In this case, the flask server is having trouble serving the large javascript bundle (1MB or larger) from the file system. I've only seen this happen on Windows machines and servers.
I'm not yet sure how to resolve this or make this more stable.
sbowman-mitre commentedon Jun 27, 2017
Well, doesn't sound like there's much you can do except raise it up to the flask group. You can close this issue (from my perspective, anyway).
chriddyp commentedon Jun 29, 2017
Thanks @sbowman-mitre ! I'll close this issue but I've opened a secondary one for this more specific problem with serving files on windows: #56
prncevince commentedon May 22, 2018
This was outstanding help. Thank you.
highwindmx commentedon Mar 17, 2019
just a kind reminder, firefox addons such as "Decentraleyes" which block cdn tracking may a reason why your page not loading properly.
Upgrade plotlyjs (plotly#46) - v0.10.0
Fix MANIFEST.in to include license (plotly#46)
Fix MANIFEST.in to include license (plotly#46)
Fix MANIFEST.in to include license (#46)
Upgrade plotlyjs (plotly#46) - v0.10.0