mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-12 10:04:14 -05:00
Default tool seems to have some encoding issue on version 0.3.13 #1785
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 @Taluen79 on GitHub (Aug 15, 2024).
I was trying to add a new tool. When you click on the "+" sign to add a new tool, you'll get the default tool for checking time and whether. I you try to save this tool, you get an error once you have read the warning about using untrusted tools. The log for this looks like this:
An error occurred: 'utf-8' codec can't decode byte 0xb0 in position 3469: invalid start byte
No requirements found in frontmatter.
Error loading module: test_tools_2
(unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte (test_tools_2.py, line 98)
DEBUG [main] Commit session after request
INFO: 192.168.1.23:59153 - "POST /api/v1/tools/create HTTP/1.1" 400 Bad Request
This issue is seems to be related to the line 98 in the python code for the default tool that looks like this:
return f"Weather in {city}: {temperature}°C"
If you remove the degree symbol and make it into:
return f"Weather in {city}: {temperature}C"
It will work save without errors.
Not very serious, but still annoying.