mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #7413] Cannot insert data into new file : no column named hash #30267
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 @Micropot on GitHub (Nov 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7413
Bug Report
Installation Method
Installation of the OpenWebui python lib with pip, running the openwebui into a docker as the doc mentionned.
Environment
Open WebUI Version: v0.4.4
Ollama (if applicable): v0.3.3
Operating System: Linux Fedora 9.4
Browser (if applicable): Edge
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
Expected Behavior:
Creation of an html file based on the json input using the FileForm class and the Files.insert_new_files() then plot the html graph into an iframe.
Actual Behavior:
[Describe what actually happened.]
Return an error mentionning that table file as no column hash
Bug Summary:
While trying to create an html file into OpenWebUi, the hash argument is causing issue.
FileForm class has hash has Optional argument. But when using the insert_new_fillle function, it creates a File object who need a hash argument.
Reproduction Details
Steps to Reproduce:
Logs and Screenshots
Error creating tool: (sqlite3.OperationalError) table file has no column named hash
[SQL: INSERT INTO file (id, user_id, hash, filename, path, data, meta, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)]
[parameters: ('4c556b92-c8f2-4425-91c7-748343fcfd11', '31505c76-ae44-4a53-b6a9-760e53227c7e', None, 'uploads/action_embed/graphic_viviane.html', 'uploads/action_embed/graphic_viviane.html', '{"data": [{"alignmentgroup": "True", "hovertemplate": "LABEL=%{x}
count=%{marker.color}", "legendgroup": "", "marker": {"color": [7 ... (8850 characters truncated) ... "legend": {"tracegroupgap": 0}, "title": {"text": "Count of Events"}, "barmode": "relative", "plot_bgcolor": "#F7FCFF", "paper_bgcolor": "#F7FCFF"}}', '{"name": "graphic_viviane.html", "content_type": "text/html", "size": 2, "path": "uploads/action_embed/graphic_viviane.html"}', 1732701343, 1732701343)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Mauvais graphique généré
ERROR python generation (sqlite3.OperationalError) no such column: file.hash
[SQL: SELECT file.id AS file_id, file.user_id AS file_user_id, file.hash AS file_hash, file.filename AS file_filename, file.path AS file_path, file.data AS file_data, file.meta AS file_meta, file.created_at AS file_created_at, file.updated_at AS file_updated_at
FROM file]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Additional Information
I think it comes from the difference beteween the class
and
The function insert_new_file ask for a FileForm object and create a File object. The hash argument create a conflict.