mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #22665] [CLOSED] fix: resolve UnboundLocalError in oracle23ai.py get() method #42435
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22665
Author: @mango766
Created: 3/14/2026
Status: ❌ Closed
Base:
main← Head:fix/oracle23ai-unbound-limit-variable📝 Commits (1)
eb43214fix: resolve UnboundLocalError in oracle23ai.py get() method📊 Changes
1 file changed (+6 additions, -7 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/oracle23ai.py(+6 -7)📄 Description
Summary
UnboundLocalErrorinOracle23aiClient.get()where thelimitvariable was referenced in alog.info()call before being assigned, crashing hybrid search for all Oracle 23ai users.limit = 1000assignment before the log statement that references it.limitparameter in the method signature.Details
In
backend/open_webui/retrieval/vector/dbs/oracle23ai.py, theget()method had:Python treats
limitas a local variable throughout the function because of the assignment on line 718. But thelog.info()on line 714 references it before the assignment executes, raising:This crashes the entire hybrid search pipeline:
query_collection_with_hybrid_search()->VECTOR_DB_CLIENT.get()-> crash.The fix simply reorders the statements so
limitis assigned before it is used.Fixes #22664
Related: #22616, #18356
Test plan
oracle23ai.pyget()method no longer raisesUnboundLocalError🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.