[GH-ISSUE #8820] Minor issue, tool python libraries must be re-imported on update #118590

Closed
opened 2026-05-20 19:56:25 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @therealmichaelberna on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8820

Bug Report

Important Notes

  • Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.

  • Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.

  • Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.

  • Bug reproducibility: If a bug cannot be reproduced with a :main or :dev Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!

Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!


Installation Method

Docker

Environment

  • Open WebUI Version: v0.5.6

  • Operating System: Rocky Linux 9

Confirmation:

  • I am on the latest version of both Open WebUI and Ollama.
  • 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:

Adding a python library to the requirements comment should install it.

Actual Behavior:

This works when initially adding a tool, but is not re-triggered after an open-webui update.

Description

Bug Summary: Python libraries listed as requirements in tools are not re-added after updating open-webui

Reproduction Details

Steps to Reproduce:
Update the docker container with sudo docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once After updating, ask the LLM a query that will require it to use a tool. If a tool with a python import is called, it will fail even if the import is includes in the requirements. If I go and click edit and save in each toolkit in the web ui, it will work after that. This has happened twice directly after upgrading.

Logs and Screenshots

Docker Container Logs:

INFO  [open_webui.utils.plugin] Loaded module: tool_misc_tools
ERROR [open_webui.utils.plugin] Error loading module: pon_tools: No module named 'netmiko'
ERROR [open_webui.utils.middleware] No module named 'netmiko'
Traceback (most recent call last):
  File "/app/backend/open_webui/utils/middleware.py", line 782, in process_chat_payload
    form_data, flags = await chat_completion_tools_handler(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/utils/middleware.py", line 228, in chat_completion_tools_handler
    tools = get_tools(
            ^^^^^^^^^^
  File "/app/backend/open_webui/utils/tools.py", line 50, in get_tools
    module, _ = load_tools_module_by_id(tool_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/utils/plugin.py", line 113, in load_tools_module_by_id
    raise e
  File "/app/backend/open_webui/utils/plugin.py", line 101, in load_tools_module_by_id
    exec(content, module.__dict__)
  File "<string>", line 9, in <module>
ModuleNotFoundError: No module named 'netmiko'
Originally created by @therealmichaelberna on GitHub (Jan 23, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8820 # Bug Report ## Important Notes - **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project. - **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours. - **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI. - **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help! Note: Please remove the notes above when submitting your post. Thank you for your understanding and support! --- ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.5.6 - **Operating System:** Rocky Linux 9 **Confirmation:** - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Adding a python library to the requirements comment should install it. ## Actual Behavior: This works when initially adding a tool, but is not re-triggered after an open-webui update. ## Description **Bug Summary:** Python libraries listed as requirements in tools are not re-added after updating open-webui ## Reproduction Details **Steps to Reproduce:** Update the docker container with `sudo docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once` After updating, ask the LLM a query that will require it to use a tool. If a tool with a python import is called, it will fail even if the import is includes in the requirements. If I go and click edit and save in each toolkit in the web ui, it will work after that. This has happened twice directly after upgrading. ## Logs and Screenshots **Docker Container Logs:** ``` INFO [open_webui.utils.plugin] Loaded module: tool_misc_tools ERROR [open_webui.utils.plugin] Error loading module: pon_tools: No module named 'netmiko' ERROR [open_webui.utils.middleware] No module named 'netmiko' Traceback (most recent call last): File "/app/backend/open_webui/utils/middleware.py", line 782, in process_chat_payload form_data, flags = await chat_completion_tools_handler( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/utils/middleware.py", line 228, in chat_completion_tools_handler tools = get_tools( ^^^^^^^^^^ File "/app/backend/open_webui/utils/tools.py", line 50, in get_tools module, _ = load_tools_module_by_id(tool_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/utils/plugin.py", line 113, in load_tools_module_by_id raise e File "/app/backend/open_webui/utils/plugin.py", line 101, in load_tools_module_by_id exec(content, module.__dict__) File "<string>", line 9, in <module> ModuleNotFoundError: No module named 'netmiko' ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#118590