mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
zhipuai:0.0.19 fails to start: ModuleNotFoundError: No module named 'sniffio' (.venv lacks pip and missing dependency declaration) #848
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 @GDNDZZK on GitHub (Dec 3, 2025).
Originally assigned to: @hjlarry on GitHub.
Self Checks
Dify version
1.10.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
After clicking Save with a ZhipuAI API key:
❌ Actual Behavior
docker compose logs -f2025/12/03 07:43:21 run.go:135: [ERROR]plugin langgenius/zhipuai:0.0.19 exited with error: exit status 1 plugin_daemon-1 | odule> plugin_daemon-1 | plugin_daemon-1 | from ._base_models import BaseModel, construct_type plugin_daemon-1 | plugin_daemon-1 | File "/app/storage/cwd/langgenius/zhipuai-0.0.19@6e2b02c20363bc5a04a3619130cdae281a8e902c468bdb93484ddf5cb670b256/.venv/lib/python3.12/site-packages/zai/core/_base_models.py", line 39, in <module> plugin_daemon-1 | plugin_daemon-1 | from ._utils import ( plugin_daemon-1 | File "/app/storage/cwd/langgenius/zhipuai-0.0.19@6e2b02c20363bc5a04a3619130cdae281a8e902c468bdb93484ddf5cb670b256/.venv/lib/python3.12/site-packages/zai/core/_utils/__init__.py", line 1, in <module> plugin_daemon-1 | plugin_daemon-1 | from ._transform import ( plugin_daemon-1 | File "/app/storage/cwd/langgenius/zhipuai-0.0.19@6e2b02c20363bc5a04a3619130cdae281a8e902c468bdb93484ddf5cb670b256/.venv/lib/python3.12/site-packages/zai/core/_utils/_transform.py", line 26, in <module> plugin_daemon-1 | plugin_daemon-1 | from ._utils import ( plugin_daemon-1 | File "/app/storage/cwd/langgenius/zhipuai-0.0.19@6e2b02c20363bc5a04a3619130cdae281a8e902c468bdb93484ddf5cb670b256/.venv/lib/python3.12/site-packages/zai/core/_utils/_utils.py", line 22, in <module> plugin_daemon-1 | plugin_daemon-1 | import sniffio plugin_daemon-1 | plugin_daemon-1 | ModuleNotFoundError: No module named 'sniffio'@GDNDZZK commented on GitHub (Dec 3, 2025):
Workaround (Temporary Fix)
Enter the
plugin_daemoncontainer:Navigate to the ZhipuAI plugin directory:
Activate the plugin’s virtual environment:
Install
pipinto the.venv:Install the missing dependency:
Exit and restart the plugin daemon:
@dosubot[bot] commented on GitHub (Dec 3, 2025):
Hi @GDNDZZK! I'm Dosu and I’m helping the dify team.
Your workaround is correct and matches what other users have done to resolve the missing
sniffiodependency for the ZhipuAI plugin in Dify 1.10.1 self-hosted Docker setups. The root cause is thatsniffiois not listed in the plugin's requirements.txt, so it isn't installed by default, leading to the ModuleNotFoundError and plugin startup failure. This issue has appeared in other plugins as well and is not unique to ZhipuAI [reference].Until the plugin's requirements.txt is updated upstream to include
sniffio, you'll need to manually install it after each plugin update or container rebuild. For a permanent fix, maintainers should addsniffioto the requirements.txt, as was done for other plugins like volcengine_maas [reference].Keep an eye on plugin updates and changelogs—if you update or reinstall the plugin and the issue returns, just repeat your workaround steps.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@dosubot[bot] commented on GitHub (Dec 3, 2025):
The ZhipuAI plugin fails because its isolated Python environment (.venv) is missing the required
sniffiodependency and doesn't have pip installed, so dependencies can't be added automatically. Installingsniffioglobally in the container doesn't help—each plugin runs in its own environment and needs dependencies installed there.Workaround:
Reference
Permanent fix:
Add
sniffio(and any other missing dependencies) to the plugin'srequirements.txt, then rebuild or restart the plugin so dependencies are installed automatically in the future.Best practice:
Always list all plugin dependencies in
requirements.txtand test plugin startup after upgrades to catch missing dependencies early. Monitor plugin daemon logs for errors, since missing dependencies can cause silent failures in the UI.This is a known issue in Dify 1.10.1 and may require manual intervention until the plugin or platform is updated to handle dependencies more robustly.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@zhaobingshuang commented on GitHub (Dec 3, 2025):
I also encountered the same problem. It might be related to the update of zai-sdk. https://github.com/zai-org/z-ai-sdk-python/issues/53
@hjlarry commented on GitHub (Dec 3, 2025):
please try 0.0.20
@zhaobingshuang commented on GitHub (Dec 3, 2025):
problem was solved