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.

Backend error 500 for SimpleExample demo app

See original GitHub issue

I think I followed the dev installation instructions:

# Using miniconda instead of virtualenv, but I doubt this is an issue
conda create -n dpd_dev python=3.6
conda activate dpd_dev

# following relevant ./make_env lines
pip install -r requirements.txt
pip install -r dev_requirements.txt
python setup.py develop

# prepare redis
docker pull redis:4
docker run -p 6379:6379 -d redis

# prepare demo
cd demo
./manage.py migrate
./manage.py shell < configdb.py
./manage.py collectstatic -i "*.py" -i "*.pyc" --noinput --link
./manage.py runserver --nostatic

# I later exited `runserver` to freeze packages those tested
pip install -r frozen_dev.txt
./manage.py runserver --nostatic

When I go to http://localhost:8000/demo-one I see the following:

image

and in the console I see

Internal Server Error: /django_plotly_dash/app/SimpleExample/_dash-update-component
Traceback (most recent call last):
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/views.py", line 77, in update
    resp = view_func()
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/dash_wrapper.py", line 456, in dispatch
    return self. dispatch_with_args(body, argMap=dict())
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/dash_wrapper.py", line 465, in dispatch_with_args
    target_id = '{}.{}'.format(output['id'], output['property'])
TypeError: string indices must be integers
Internal Server Error: /django_plotly_dash/app/SimpleExample/_dash-update-component
Traceback (most recent call last):
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/dwinston/miniconda3/envs/djd_dev/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/views.py", line 77, in update
    resp = view_func()
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/dash_wrapper.py", line 456, in dispatch
    return self. dispatch_with_args(body, argMap=dict())
  File "/Users/dwinston/repos/django-plotly-dash/django_plotly_dash/dash_wrapper.py", line 465, in dispatch_with_args
    target_id = '{}.{}'.format(output['id'], output['property'])
TypeError: string indices must be integers
HTTP GET /django_plotly_dash/app/SimpleExample/_dash-component-suites/dash_core_components/dash_core_components.min.js.map 302 [0.03, 127.0.0.1:51759]
HTTP POST /django_plotly_dash/app/SimpleExample/_dash-update-component 500 [0.08, 127.0.0.1:51757]
HTTP POST /django_plotly_dash/app/SimpleExample/_dash-update-component 500 [0.08, 127.0.0.1:51755]
HTTP GET /static/dash/component/dash_core_components/dash_core_components.min.js.map 304 [0.00, 127.0.0.1:51759]

Any advice? It seems that the value of the ‘output’ key in the body argument passed to django_plotly_dash.dash_wrapper.dispatch_with_args is a string rather than dict-like. This is the basic first “hello world” demo, so I’m wondering if I’m installing everything properly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
GibbsConsultingcommented, Apr 22, 2019

#146 should fix this, now pushed as prerelease v0.9.10

0reactions
dwinstoncommented, May 2, 2019

Fixed! Thanks @delsim !

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP 500 Internal Server Error: What It Means & How to Fix It
This is an HTTP response status code error. It tells you that a web browser wants to access your web page and your...
Read more >
500 Internal Server Error | Apigee Edge
Shows example 500 Internal Server Errors caused by a failure in backend server and shows steps to resolve the errors. Symptom. The client...
Read more >
How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
Read more >
What is “HTTP 500 Internal Server Error” and How to Fix It?
The “HTTP 500 Internal Server Error” is very common and it can be caused by various problems. Learn more about the error and...
Read more >
How to Fix the 500 Internal Server Error on Your WordPress ...
Depending on the server, you may get more of a code to narrow down the problem, such as 500.12, which means an application...
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