mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #78] TypeError: expected string or bytes-like object, got 'list' when sending a message with an image attachment #34
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @chhotu-claw on GitHub (Jun 24, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/78
Summary
Sending a chat message that includes an image attachment (e.g. a screenshot) crashes the chat task with
TypeError: expected string or bytes-like object, got 'list'. Text-only messages work fine. The failure happens during$skill-namemention parsing, which assumes the user message content is always a string.Environment
Steps to reproduce
Expected
The message (text + image) is processed normally, the same as a text-only message.
Actual
The chat task raises:
The offending
contentvalue at the time of failure:Root cause
In
run_chat_task(cptr/utils/chat_task.py), the$skill-namemention parser runsre.findalldirectly onlast_user["content"]:For text-only messages
contentis astr, but for multimodal messages (any attachment) it's a list of content blocks, whichre.findallcannot accept.Suggested fix
Extract the text blocks before matching:
This preserves
$skillmention detection (now scanning the text portions of multimodal messages) while fixing the crash. Worth auditing other spots in the message path that assumecontentis astr, in case the same assumption appears elsewhere.@tjbck commented on GitHub (Jun 25, 2026):
Should be addressed!