Fix Traceback meeting.import
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
Research direction
The traceback points to prefetch in openslides_backend/action/actions/meeting/import_.py (around line 144), called from perform (around line 100). Check what shape action_data has when committee_id is missing, and how the import payload schema is meant to require it. Done means a request without committee_id gets a proper validation error instead of a 500 KeyError, or the missing key is handled deliberately, with a test covering that case.
Written by the indexing model from the issue text.
Description
INFO:openslides_backend.shared.handlers.base_handler:Performing action meeting.import.
[ERROR] Error handling request POST /system/action/handle_request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 516, in handle
return self._keepalive_after(conn, self.handle_request(req, conn))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 712, in handle_request
respiter = self.wsgi(environ, resp.start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/http/application.py", line 164, in __call__
return self.wsgi_application(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/http/application.py", line 154, in wsgi_application
response = self.dispatch_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/http/application.py", line 103, in dispatch_request
response_body, access_token = view_instance.dispatch(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/http/views/base_view.py", line 121, in dispatch
return func(request)
^^^^^^^^^^^^^
File "/app/openslides_backend/http/views/action_view.py", line 56, in action_route
response = handle_action_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_worker.py", line 94, in handle_action_in_worker_thread
raise action_worker_thread.exception
File "/app/openslides_backend/action/action_worker.py", line 265, in run
self.response = self.handler.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 142, in handle_request
results = self.execute_write_requests(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 234, in execute_write_requests
write_requests, data = get_write_requests(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 284, in parse_actions
write_request, results = self.perform_action(
^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 333, in perform_action
write_request, results = action.perform(
^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/actions/meeting/import_.py", line 100, in perform
self.prefetch(action_data)
File "/app/openslides_backend/action/actions/meeting/import_.py", line 144, in prefetch
list({instance["committee_id"] for instance in action_data}),
~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'committee_id'
- Dominant language
- Python
- Stars
- 9
- Forks
- 41
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 48
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenSlides/openslides-backend
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenSlides/openslides-backend#3774 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenSlides/openslides-backend#3756 · 2 comments ·
Maintainers usually reply within 1 day
-
Consultation sequence: new settingPossibly taken @luisa-beerboom claimed this 19 days ago. Openfeature Lorentz
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenSlides/openslides-backend#3704 · 5 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenSlides/openslides-backend#3430 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 58/100
OpenSlides/openslides-backend#3885 ·
Maintainers usually reply within 1 day
All issues in OpenSlides/openslides-backend
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Pantheon-Security/medusa#24 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
docs(notation): the ipa_to_arpa section does not name the tied and non-syllabic diphthong formsOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
TigreGotico/scriptconv#445 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TigreGotico/phoonnx#1045 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days