OpenSlides / OpenSlides/openslides-backend
Catch traceback from presumably incorrect participant.import
Open
Beginner friendly
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 9
- Forks
- 40
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 19
Description
A presumably incorrect participant import should not throw a traceback.
Unfortunately I only have the traceback and not the import file.
INFO:openslides_backend.shared.handlers.base_handler:Performing action participant.import.
[2026-09-14 12:09:31 +0000] [16] [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 479, in handle
keepalive = self.handle_request(req, conn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 678, 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 140, in handle_request
results = self.execute_write_requests(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 229, in execute_write_requests
write_requests, data = get_write_requests(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 279, in parse_actions
write_request, results = self.perform_action(
^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action_handler.py", line 328, in perform_action
write_request, results = action.perform(
^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/actions/meeting_user/mixin.py", line 52, in perform
return super().perform(action_data, user_id, internal, is_sub_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/openslides_backend/action/action.py", line 157, in perform
self.prefetch(action_data)
File "/app/openslides_backend/action/actions/user/participant_import.py", line 24, in prefetch
super().prefetch(action_data)
File "/app/openslides_backend/action/mixins/import_mixins.py", line 210, in prefetch
store_id = cast(list[dict[str, Any]], action_data)[0]["id"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'id'
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with openslides_backend/action/actions/user/participant_import.py and the failing lookup in openslides_backend/action/mixins/import_mixins.py:210. Reproduce an import action whose data lacks the id key, then verify that the malformed import is handled without propagating a traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100