mirror of
https://github.com/open-webui/pipelines.git
synced 2026-11-05 01:37:24 +00:00
[GH-ISSUE #511] TypeError: list indices must be integers or slices, not str when using Pipelines in v0.6.5 #234
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/pipelines#234
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 @hirokawaguchi on GitHub (Apr 21, 2025).
Original GitHub issue: https://github.com/open-webui/pipelines/issues/511
Describe the bug
When attempting to use any pipeline (even a minimal one) via the
/api/chat/completionsendpoint, OpenWebUI v0.6.5 throws aTypeError: list indices must be integers or slices, not str. This results in a400 Bad Requestresponse, and the pipeline code itself is never executed. The error seems to occur within the main OpenWebUI backend code while processing the request before dispatching it to the pipeline server. Regular models (non-pipeline) work correctly.To Reproduce
hello.pyin thepipelinesdirectory) like the simplified one below:open-webuicontainer (e.g., setGLOBAL_LOG_LEVEL=DEBUGindocker-compose.yaml).400 Bad Requesterror in the UI and the browser's network console.open-webuicontainer.Expected behavior
The
/api/chat/completionsrequest should succeed (return 200 OK), and the pipeline'spipemethod should be called, processing the message and returning a response. The pipeline server logs should show thepipe function called.message.Actual behavior
The request fails with a
400 Bad Request. Theopen-webuicontainer log shows the following DEBUG messages just before the error, indicating the error occurs within the main backend when processing the chat payload for a pipeline model:(Note: Some parts of the log like user ID, chat ID, full form_data details, etc., were truncated for brevity)
The pipeline server (
open-webui-pipelines-1container) logs show theon_startupmessage but never receive the request to execute thepipemethod.Environment details
Additional context
This issue seems specific to the pipeline functionality introduced/updated around v0.6.x. Using standard LLMs (not pipelines) works correctly, and the
/api/chat/completionsendpoint returns a 200 OK status for them. The error occurs regardless of the complexity of the pipeline code itself.@MichelDucartier commented on GitHub (May 2, 2025):
In case if anyone stumbles on this, the issue seems to linked to this part in open-webui:
urlIdx is a str and needs to be cast to int