You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I am using English to submit this report, otherwise it will be closed.
【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
Please do not modify this template :) and fill in all the required fields.
Dify version
1.9.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
❌ Actual Behavior
When I added documents to the knowledge base and tried to reference the knowledge base during a chat to answer questions, I found that the knowledge base wasn’t being used. Then, when I ran a data recall test in the knowledge base, I encountered the error shown above. I deployed Dify using the Docker method described in the documentation, and all containers are running normally.
The error No module named 'weaviate.classes' means your Docker environment is missing the required Weaviate Python client (version 4.x), which is needed for Dify's knowledge base features to work. Recent updates to Dify's Docker setup explicitly install weaviate>=4.0.0 in the API container to fix this issue. To resolve it, update your deployment so the API container runs pip install --no-cache-dir 'weaviate>=4.0.0' before starting the service. You can see how this is done in the new docker-compose.override.yml added to the project, which mounts the Weaviate integration file and installs the correct package at startup (details).
If you are using an older Docker image or compose file, manually add this install step to your API container or update to the latest compose setup. This will restore knowledge base recall and chat integration with Weaviate.
I have upgraded to the latest versions, specifically weaviate==0.1.2 and weaviate-client==3.8.0, but I'm still encountering the error "No module named 'weaviate.classes'."
The error No module named 'weaviate.classes' means your Docker environment is missing the required Weaviate Python client (version 4.x), which is needed for Dify's knowledge base features to work. Recent updates to Dify's Docker setup explicitly install weaviate>=4.0.0 in the API container to fix this issue. To resolve it, update your deployment so the API container runs pip install --no-cache-dir 'weaviate>=4.0.0' before starting the service. You can see how this is done in the new docker-compose.override.yml added to the project, which mounts the Weaviate integration file and installs the correct package at startup (details).
If you are using an older Docker image or compose file, manually add this install step to your API container or update to the latest compose setup. This will restore knowledge base recall and chat integration with Weaviate.
@dosu Hello, thank you for your help. I followed your instructions and restarted the containers using docker-compose, but the other error occurred, as shown below.
Additionally, if there are fixes for certain bugs, could they be applied directly to the docker-compose.yml file instead of docker-compose.override.yml? After all, the documentation’s Docker startup instructions only mention running docker compose up, and do not refer to docker-compose.override.yml.
The error No module named 'weaviate.classes' means your Docker environment is missing the required Weaviate Python client (version 4.x), which is needed for Dify's knowledge base features to work. Recent updates to Dify's Docker setup explicitly install weaviate>=4.0.0 in the API container to fix this issue. To resolve it, update your deployment so the API container runs pip install --no-cache-dir 'weaviate>=4.0.0' before starting the service. You can see how this is done in the new docker-compose.override.yml added to the project, which mounts the Weaviate integration file and installs the correct package at startup (details).
If you are using an older Docker image or compose file, manually add this install step to your API container or update to the latest compose setup. This will restore knowledge base recall and chat integration with Weaviate.
The HTTP 422 error about "no GraphQL provider or schema" means your Weaviate instance is running without the required schema for Dify's knowledge base integration. Dify expects to programmatically initialize the schema when it connects to Weaviate, but if the Weaviate server was upgraded, reset, or started fresh, you may need to reinitialize the knowledge base or reimport documents so Dify can create the schema via its backend code. Try deleting and recreating the knowledge base or re-uploading your documents in the Dify UI to trigger schema setup.
For Docker Compose: you can apply fixes (like installing Python packages) directly in docker-compose.yml or in docker-compose.override.yml. Both files are picked up automatically when you run docker compose up—the override file is just a convention for customizations or local changes, but direct edits to docker-compose.yml work as well. The recent Dify updates use docker-compose.override.yml to install the correct Weaviate client, but you can move those install steps to docker-compose.yml if you prefer a single file setup details.
If you continue to see schema errors after confirming the client version and restarting, check that your Weaviate container is healthy and that the knowledge base is initialized with at least one document. If the schema is still missing, you may need to manually trigger a reimport or initialization from the Dify UI.
@dosu._
Thank you! After I deleted the existing document records and re-uploaded the knowledge base documents, both the knowledge base data recall and the LLM knowledge base referencing started working properly!
@showfuture
Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
git checkout 1.9.1 and try again.
Thank you very much for your help. It's all set now.
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
@showfuture Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
git checkout 1.9.1 and try again.
not work in 1.9.1
Please first execute the "git fetch" command
i use docker compose to deploy it
Yes, I also used Docker Compose for the deployment. You need to first use the git command to obtain the code of the specified branch, and then redeploy.
Activity
dosubot commentedon Oct 15, 2025
Hi @showfuture! I'm Dosu and I’m helping the dify team.
The error
No module named 'weaviate.classes'means your Docker environment is missing the required Weaviate Python client (version 4.x), which is needed for Dify's knowledge base features to work. Recent updates to Dify's Docker setup explicitly installweaviate>=4.0.0in the API container to fix this issue. To resolve it, update your deployment so the API container runspip install --no-cache-dir 'weaviate>=4.0.0'before starting the service. You can see how this is done in the newdocker-compose.override.ymladded to the project, which mounts the Weaviate integration file and installs the correct package at startup (details).If you are using an older Docker image or compose file, manually add this install step to your API container or update to the latest compose setup. This will restore knowledge base recall and chat integration with Weaviate.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

protectedMan commentedon Oct 15, 2025
I have upgraded to the latest versions, specifically weaviate==0.1.2 and weaviate-client==3.8.0, but I'm still encountering the error "No module named 'weaviate.classes'."
showfuture commentedon Oct 15, 2025
@dosu Hello, thank you for your help. I followed your instructions and restarted the containers using docker-compose, but the other error occurred, as shown below.
Additionally, if there are fixes for certain bugs, could they be applied directly to the docker-compose.yml file instead of docker-compose.override.yml? After all, the documentation’s Docker startup instructions only mention running docker compose up, and do not refer to docker-compose.override.yml.
dosubot commentedon Oct 15, 2025
The HTTP 422 error about "no GraphQL provider or schema" means your Weaviate instance is running without the required schema for Dify's knowledge base integration. Dify expects to programmatically initialize the schema when it connects to Weaviate, but if the Weaviate server was upgraded, reset, or started fresh, you may need to reinitialize the knowledge base or reimport documents so Dify can create the schema via its backend code. Try deleting and recreating the knowledge base or re-uploading your documents in the Dify UI to trigger schema setup.
For Docker Compose: you can apply fixes (like installing Python packages) directly in docker-compose.yml or in docker-compose.override.yml. Both files are picked up automatically when you run
docker compose up—the override file is just a convention for customizations or local changes, but direct edits to docker-compose.yml work as well. The recent Dify updates use docker-compose.override.yml to install the correct Weaviate client, but you can move those install steps to docker-compose.yml if you prefer a single file setup details.If you continue to see schema errors after confirming the client version and restarting, check that your Weaviate container is healthy and that the knowledge base is initialized with at least one document. If the schema is still missing, you may need to manually trigger a reimport or initialization from the Dify UI.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

showfuture commentedon Oct 15, 2025
@dosu._
Thank you! After I deleted the existing document records and re-uploaded the knowledge base documents, both the knowledge base data recall and the LLM knowledge base referencing started working properly!
ViPenn commentedon Oct 15, 2025
@showfuture

Hello, I'm sorry to disturb you. I also encountered the same problem. However, even after modifying the YAML and redeploying, the error "No module named 'weaviate.classes'" still occurred. Below is my YAML file. Could you please take a look at it for me?
showfuture commentedon Oct 15, 2025
ViPenn commentedon Oct 15, 2025
Thank you very much for your help. It's all set now.
pigracing commentedon Oct 17, 2025
not work in 1.9.1
ViPenn commentedon Oct 17, 2025
Please first execute the "git fetch" command
pigracing commentedon Oct 17, 2025
i use docker compose to deploy it
ViPenn commentedon Oct 17, 2025
Yes, I also used Docker Compose for the deployment. You need to first use the git command to obtain the code of the specified branch, and then redeploy.