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.

Exception 'Unable to find stateless DjangoApp called' or 'NoLayout'

See original GitHub issue

When i was working on some django-plotly-dash charts, i found a strange error happened from time to time, I will see some error like

KeyError at /django_plotly_dash/app/DPD-xxx/
'Unable to find stateless DjangoApp called dpd-xxx'

Sometimes I got an error like

NoLayoutException at /reports/xxx/
Layout must be a dash component or a function that returns a dash component.

Sometime I just got an blank div with text error saying

Error loading layout

BUT if i refresh the pages a few times then the errors just went away and the chart could be displayed correctly.

Have anyone experienced this? Could anyone please help pointing out what i did it wrong?

Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
GibbsConsultingcommented, Oct 15, 2020

@miaoz2001 good to hear that the error is cleared up. However, what is your motivation behind trying to encapsulate the app within a class view? The app is something that gets used by the template rendered as a result of the response of your view, rather than from within your view.

If you’re looking to control the content of the app based on your view, then take a look at initial_arguments to the template tags - this allows you to instantiate an instance of an app with values from your view.

0reactions
miaoz2001commented, Oct 15, 2020

Thanks! I got it, I should just put all the app, layout, callback in one file and imported all at once, to keep it simple, instead i was trying to put them into a class view, which caused strange errors.

Now it is working anyway However i knid of hope that the app, layout and callback could be enclosed inside of a class view but haven’t figure it out yet

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

KeyError: 'Unable to find stateless DjangoApp called app'
I've changed the order of given urlpatterns (position 1: path('app1/', position 2: path('/'). Result: KeyError Exception Value: 'Unable to find ...
Read more >
Django_plotly_dash Unable to find stateless DjangoApp ...
Hi,. I'm using django_plotly_dash for a webapp and i does it not allow to use Dash applications with a different name to SimpleExample....
Read more >
'Unable to find stateless DjangoApp called app'-django
Why the DjangoApp app can't be found? Given result. After executing manage.py runserver in the console Django is starting properly but in case...
Read more >
How to integrate Django Plotly Dash into existing website
Unable to find stateless DjangoApp called simpleexample ... there are some links but there is know the main information about integrating .
Read more >
Can I learn Django without knowing coding? - Quora
For Django it's Python code that does that( see ORM). In some advanced scenarios SQL is ... So similarly, You can't learn Django...
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