mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #20365] issue: Floating Quick Actions fails with "NoneType has no attribute 'get'" when parent_message is None #19173
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ledamorita on GitHub (Jan 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20365
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.43
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When I highlight a specific section of text within an AI response and select the "Explain" (or "Ask") button from the floating quick action menu, OpenWebUI should trigger a new generation task. The system should process the selected text and stream a response explaining the context, without throwing any UI errors or backend exceptions.
Actual Behavior
Upon clicking the "Explain" button on the highlighted text, the action fails immediately.
UI: A red error toast notification appears at the top right corner saying: "An error occurred while fetching the explanation."
Steps to Reproduce
Logs & Screenshots
Additional Information
Root Cause Analysis
After debugging, I found the issue in
backend/open_webui/main.py:Line 1625 -
parent_messageis set toNone:Line 1648 - Attempts to get
parent_messagefrom metadata:The Problem: When a key exists in a dictionary with value
None,.get(key, default)returnsNone, NOT the default value.Line 1649 - Tries to call
.get()onNone:This causes the error because
Nonehas no.get()method.Proposed Solution
Change line 1648 from:
To:
This ensures that if
parent_messageisNone, it will be replaced with an empty dictionary{}.@Classic298 commented on GitHub (Jan 4, 2026):
Fixed in dev please check for duplicates
@ledamorita commented on GitHub (Jan 4, 2026):
Got it, thanks for the fix!