Document stuck in queue - "poetry run flask db upgrade" command returned "None of PyTorch, TensorFlow >= 2.0, or Flax have been found" #6229

Closed
opened 2026-02-21 18:14:39 -05:00 by yindo · 5 comments
Owner

Originally created by @AcacioAraujo on GitHub (Oct 22, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Tried to add knowledge base but document is stuck in queue
Worker log: mind attached file
worker log

tried to run "poetry run flask db upgrade" command, but returned message "None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used."
mind attached file
poetry log

✔️ Expected Behavior

Document should be processed

Actual Behavior

document stuck in queue

Originally created by @AcacioAraujo on GitHub (Oct 22, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.8.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Tried to add knowledge base but document is stuck in queue Worker log: mind attached file ![worker log](https://github.com/user-attachments/assets/e217261b-d3b2-4342-a306-26877efe2d3c) tried to run "poetry run flask db upgrade" command, but returned message "None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used." mind attached file ![poetry log](https://github.com/user-attachments/assets/1b2134a5-a085-4868-9182-c67f2399c4b4) ### ✔️ Expected Behavior Document should be processed ### ❌ Actual Behavior document stuck in queue
yindo added the 🐞 bug label 2026-02-21 18:14:39 -05:00
yindo closed this issue 2026-02-21 18:14:39 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 22, 2024):

I found a similar discussion and issue related to the error you're encountering:

  1. Document stuck in queue - "poetry run flask db upgrade" command returned "None of PyTorch, TensorFlow >= 2.0, or Flax have been found" - This discussion is unsolved and was last updated on October 21, 2024 [1].

  2. Upgrade with docker-compose, execute database migration, PyTorch, TensorFlow >= 2.0, or flex not found. - This issue is closed. The suggested solution involves modifying your Dockerfile or Docker Compose setup to ensure that PyTorch, TensorFlow, and Flax are installed. You can add installation commands for these libraries in your Dockerfile or include them in your requirements.txt file [2].

To resolve the issue, you can try the following steps:

  • Dockerfile Adjustments: Add installation commands for PyTorch, TensorFlow, and Flax in your Dockerfile. For example:

    FROM python:3.8
    RUN pip install torch==1.8.1 tensorflow>=2.0 flax
    
  • Requirements File: If using a requirements.txt, add the necessary libraries:

    torch==1.8.1
    tensorflow>=2.0
    flax
    
  • Docker Compose: Ensure the service responsible for the migration has access to an environment with these libraries installed.

After making these changes, rebuild your Docker images and run the containers again. This should help resolve the issue with the missing libraries.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 22, 2024): <!-- Answer --> I found a similar discussion and issue related to the error you're encountering: 1. [Document stuck in queue - "poetry run flask db upgrade" command returned "None of PyTorch, TensorFlow >= 2.0, or Flax have been found"](https://github.com/langgenius/dify/discussions/9577) - This discussion is unsolved and was last updated on October 21, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/9577)</sup>. 2. [Upgrade with docker-compose, execute database migration, PyTorch, TensorFlow >= 2.0, or flex not found.](https://github.com/langgenius/dify/issues/3181) - This issue is closed. The suggested solution involves modifying your Dockerfile or Docker Compose setup to ensure that PyTorch, TensorFlow, and Flax are installed. You can add installation commands for these libraries in your Dockerfile or include them in your `requirements.txt` file <sup>[[2]](https://github.com/langgenius/dify/issues/3181)</sup>. To resolve the issue, you can try the following steps: - **Dockerfile Adjustments**: Add installation commands for PyTorch, TensorFlow, and Flax in your Dockerfile. For example: ```Dockerfile FROM python:3.8 RUN pip install torch==1.8.1 tensorflow>=2.0 flax ``` - **Requirements File**: If using a `requirements.txt`, add the necessary libraries: ``` torch==1.8.1 tensorflow>=2.0 flax ``` - **Docker Compose**: Ensure the service responsible for the migration has access to an environment with these libraries installed. After making these changes, rebuild your Docker images and run the containers again. This should help resolve the issue with the missing libraries. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Oct 22, 2024):

This is not the root cause of the problem.

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version.

@crazywoola commented on GitHub (Oct 22, 2024): This is not the root cause of the problem. > None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version.
Author
Owner

@AcacioAraujo commented on GitHub (Oct 22, 2024):

This is not the root cause of the problem.

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version.

Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly.

@AcacioAraujo commented on GitHub (Oct 22, 2024): > This is not the root cause of the problem. > > > None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. > > This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version. Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly.
Author
Owner

@Halfknow commented on GitHub (Oct 25, 2024):

This is not the root cause of the problem.

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version.

Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly.

Hi! I wonder how to solve this problem, could you specify what needs to be changed in the docker compose file?

@Halfknow commented on GitHub (Oct 25, 2024): > > This is not the root cause of the problem. > > > None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. > > > > > > This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version. > > Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly. Hi! I wonder how to solve this problem, could you specify what needs to be changed in the docker compose file?
Author
Owner

@pratikchandrani commented on GitHub (Nov 12, 2024):

This is not the root cause of the problem.

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version.

Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly.

I am also facing the same problem. Please share the changes you made to docker compose file so that we can learn from it. Thanks in advance.

@pratikchandrani commented on GitHub (Nov 12, 2024): > > This is not the root cause of the problem. > > > None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. > > > > > > This is just a warning message, the problem is that you can not locate the migration file, please clean up the database and recreate the containers or upgrade to a higher version, this happens when you try to downgrade the version. > > Hi! I´ve found the root of the problem here. I changed a docker compose file configuration and now it´s working properly. I am also facing the same problem. Please share the changes you made to docker compose file so that we can learn from it. Thanks in advance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6229