KeyError caused by translation application callback
- Dominant language
- Jupyter Notebook
- Stars
- 8
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
`ERROR:applications.alouette.alouette:Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/app.py”, line 2446, in wsgi_app
response = self.full_dispatch_request()
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/app.py”, line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/app.py”, line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/_compat.py”, line 39, in reraise
raise value
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/app.py”, line 1949, in full_dispatch_request
rv = self.dispatch_request()
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/flask/app.py”, line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File “/home/ckanportal/ckan/lib/default/src/ckan/alouette_app/alouette_venv/lib/python3.7/site-packages/dash/dash.py”, line 1030, in dispatch
func = self.callback_map[output][“callback”]
KeyError: ‘..page-title.children…learn-more-button.children…ionograms-ratio.children…description-1.children…description-2.children…github-link.children…select-data.children…latitude-text.children…longitude-text.children…Map_description-1.children…yearslider-text.children…groundstations-text.children…download-button-1.children…download-button-2.children…Graph_description-1.children…x-axis-selection-text.children…y-axis-selection-text.children…Graph_description-2.children…stat-selection-text.children…stat-y-axis-text.children…ground_station_list.options…x_axis_selection_1.options…y_axis_selection_1.options…y_axis_selection_2.options…Map_description-2.children…stat_selection.options..’`
This error happened on the production server. I was unable to reproduce it on a local installation and was unable to clearly identify the source issue. It seems that the KeyError is raised because the string `‘..page-title.children…learn-more-button.children….....…stat_selection.options..’` is not a correct key. The elements of this string are all individual keys. This error does not happen on a regular basis.
This issue will be further looked into if it reoccurs more frequently.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Flask wsgi_app trace and Dash dash.py dispatch entry point, then inspect how the translation callback is registered and how its combined output key is formed. Compare that key with Dash's callback_map when the production error occurs. Done means the callback dispatch no longer raises this KeyError and the registered output key is handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100