plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.15k stars 2.04k forks source link

Django-plotly-dash with dash 1.11.0 throws TypeError when trying to render app #1198

Open pallavg opened 4 years ago

pallavg commented 4 years ago

Describe your context I have been using Django-plotly-dash to create dashboard with Ploty/Dash/Bootstrap4 components. The app was working fine until I upgraded from dash 1.10.0 -> 1.11.0. In 1.11.0, I am getting a TypeError exception. Unfortunately, I can't figure out if the Django-plotly-dash plugin would need an update (due to some breaking change in Dash) or there is some bug in 1.11.0.

Another user has filed a ticket with django-plotly-dash experiencing the same, and I added some information there which describes the packages that were updated that is causing this issue. Please see https://github.com/GibbsConsulting/django-plotly-dash/issues/237

Describe the bug Getting a TypeError exception. Please see https://github.com/GibbsConsulting/django-plotly-dash/issues/237

Exception Type: TypeError at /dashboard/ Exception Value: expected string or bytes-like object

Expected behavior

A nice dashboard should load 😃, just like it did with dash v1.10.0.

Screenshots

N/A.

krasomil commented 4 years ago

I've been trying to find the reason by testing the code of django_plotly_dash and I figured out that the method below in models.py (line 232) doesn't execute. However, I didn't finish investigating all underlying methods

app = dash_app.as_dash_instance(cache_id=cache_id)

The error appears in one of its underlying methods get_local_stateless_by_name(name) in dash_wrapper.py but I haven't finished testing this function. I hope this helps.