question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dash displaying fine, until serve_locally=True is called

See original GitHub issue

I’m very much new to this library, and have (luckily!) managed to get it working as per intent.

However, I’m trying to include some local images into Dash, and face some problems.

One key thing is that Dash works perfectly when app = DjangoDash("SimpleExample", add_bootstrap_links=True) is instantiated. However, when I add serve_locally=True, Dash breaks, and permanently shows a “Loading” at the top left corner.

What possible reasons could there be for this to happen?

without serve_locally = True

[22/Jul/2020 18:22:37] “GET /gstt/charts/ HTTP/1.1” 200 9727 [22/Jul/2020 18:22:38] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-dependencies HTTP/1.1” 200 3 [22/Jul/2020 18:22:38] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-layout HTTP/1.1” 200 378834 [22/Jul/2020 18:22:38] “GET /static/images/favicon.ico HTTP/1.1” 200 120137 Not Found: /gstt/charts/in.png [22/Jul/2020 18:22:38] “GET /gstt/charts/in.png HTTP/1.1” 404 3203

with serve_locally = True

[22/Jul/2020 18:23:06] “GET /gstt/charts/ HTTP/1.1” 200 10223 [22/Jul/2020 18:23:06] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dpd_static_support/bootstrap.v0_1m1594920530.min.css HTTP/1.1” 302 0 [22/Jul/2020 18:23:06] “GET /static/dash/component/dpd_static_support/bootstrap.min.css HTTP/1.1” 404 1880 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/polyfill@7.v1_5_1m1593111715.8.7.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/react@16.v1_5_1m1593111715.13.0.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/react-dom@16.v1_5_1m1593111715.13.0.min.js HTTP/1.1” 302 0
[22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/prop-types@15.v1_5_1m1593111715.7.2.min.js HTTP/1.1” 302 0
[22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dpd_components/bundle.v0_1_0m1531261909.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_renderer/polyfill@7.8.7.min.js HTTP/1.1” 404 1877 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_core_components/dash_core_components.v1_10_1m1592438756.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_core_components/dash_core_components-shared.v1_10_1m1592438756.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_renderer/react@16.13.0.min.js HTTP/1.1” 404 1874 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_core_components/dash_core_components.min.js HTTP/1.1” 404 1916 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_renderer/react-dom@16.13.0.min.js HTTP/1.1” 404 1886 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_renderer/prop-types@15.7.2.min.js HTTP/1.1” 404 1886 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_core_components/dash_core_components-shared.js HTTP/1.1” 404 1925 [22/Jul/2020 18:23:07] “GET /static/dash/component/dpd_components/bundle.js HTTP/1.1” 404 1844 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_core_components/dash_core_components.v1_10_1m1592438756.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/dash_renderer.v1_5_1m1593111738.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_html_components/dash_html_components.v1_0_3m1585775459.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_core_components/dash_core_components.min.js HTTP/1.1” 404 1916 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_renderer/dash_renderer.min.js HTTP/1.1” 404 1874 [22/Jul/2020 18:23:07] “GET /static/dash/component/dash_html_components/dash_html_components.min.js HTTP/1.1” 404 1916 [22/Jul/2020 18:23:08] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_core_components/dash_core_components-shared.v1_10_1m1592438756.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:08] “GET /static/dash/component/dash_core_components/dash_core_components-shared.js HTTP/1.1” 404 1925 [22/Jul/2020 18:23:08] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_html_components/dash_html_components.v1_0_3m1585775459.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:08] “GET /static/dash/component/dash_html_components/dash_html_components.min.js HTTP/1.1” 404 1916 [22/Jul/2020 18:23:08] “GET /gstt/django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_renderer/dash_renderer.v1_5_1m1593111738.min.js HTTP/1.1” 302 0 [22/Jul/2020 18:23:08] “GET /static/dash/component/dash_renderer/dash_renderer.min.js HTTP/1.1” 404 1874 [22/Jul/2020 18:23:08] “GET /static/images/favicon.ico HTTP/1.1” 200 120137

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:43 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
UlrichEschcolcommented, Oct 29, 2021

Same issue. Almost stuck here. When I use the path “C/…/image.png”, it works fine. But when i tried with “image.png”, or “./assets/image.png” it doesn’t work.

1reaction
etjkaicommented, Oct 29, 2021

@kooshan75 Nope, sorry. Hope you’ll be able to resolve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Callbacks | Dash for Python Documentation | Plotly
It is empty when the callback is called on initial load, unless an Input prop got its value from another initial callback. Callbacks...
Read more >
Changing visibility of a Dash Component by updating other ...
You could place the Component you need to hide inside an html.div([]) and change its 'display' option to 'none' in a callback.
Read more >
5 challenges using Plotly Dash for web apps | Analytics Vidhya
Dash on the client side uses a Redux store it seems but there is no access to it. OK, not a big deal...
Read more >
Develop Data Visualization Interfaces in Python With Dash
The good news is that you now have a working version of your dashboard. The bad news is that there's still some work...
Read more >
Introduction to Dash Plotly Dynamic Callbacks - YouTube
Dynamic callbacks (pattern-matching callbacks) is one of the most advanced features of Dash. The downloadable code will illustrate how ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found