[GH-ISSUE #8214] Throwing errors if 'Temporary Chat' is enabled #53708

Closed
opened 2026-05-05 15:10:22 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @pekrockstar on GitHub (Dec 30, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8214

The backend will keep outputting errors if the temporary mode is enabled, I checked the code and pinpointed it here:

2299f48430/backend/open_webui/utils/middleware.py (L753)

Error info:

    message = message_map.get(metadata["message_id"])                                                                                                                                                                                          
              ^^^^^^^^^^^^^^^                                                                                                                                                                                                                  
AttributeError: 'NoneType' object has no attribute 'get'

Code should include a conditional check:

message = message_map.get(metadata["message_id"]) if message_map else None
Originally created by @pekrockstar on GitHub (Dec 30, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8214 The backend will keep outputting errors if the `temporary mode` is enabled, I checked the code and pinpointed it here: https://github.com/open-webui/open-webui/blob/2299f4843003759290cc6bf823595c6578ee4470/backend/open_webui/utils/middleware.py#L753 Error info: ```shell message = message_map.get(metadata["message_id"]) ^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' ``` Code should include a conditional check: ```python message = message_map.get(metadata["message_id"]) if message_map else None ```
Author
Owner

@tjbck commented on GitHub (Dec 30, 2024):

Good catch, fixed on dev!

<!-- gh-comment-id:2565843053 --> @tjbck commented on GitHub (Dec 30, 2024): Good catch, fixed on dev!
Author
Owner

@silentoplayz commented on GitHub (Dec 31, 2024):

I can confirm there's no error being thrown on the backend regarding usage of the temporary chat feature on the dev branch.

<!-- gh-comment-id:2566108471 --> @silentoplayz commented on GitHub (Dec 31, 2024): I can confirm there's no error being thrown on the backend regarding usage of the temporary chat feature on the dev branch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#53708