poetry.lock requires regeneration when install locally from source code #7661

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

Originally created by @chtnnh on GitHub (Jan 10, 2025).

Originally assigned to: @laipz8200 on GitHub.

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.15.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Follow the steps on this page till number 3 here

Step 4 poetry install results in an error.

✔️ Expected Behavior

Packages installed without error.

Actual Behavior

pyproject.toml changed significantly since poetry.lock was last generated. Run poetry lock to fix the lock file.

I'm new to poetry but I think this can be fixed with an updated poetry.lock being pushed.

Originally created by @chtnnh on GitHub (Jan 10, 2025). Originally assigned to: @laipz8200 on GitHub. ### 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.15.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce Follow the steps on this page till number 3 [here](https://docs.dify.ai/getting-started/install-self-hosted/local-source-code#follow-these-steps) Step 4 `poetry install` results in an error. ### ✔️ Expected Behavior Packages installed without error. ### ❌ Actual Behavior `pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.` I'm new to poetry but I think this can be fixed with an updated poetry.lock being pushed.
yindo added the 🐞 bug label 2026-02-21 18:21:42 -05:00
yindo closed this issue 2026-02-21 18:21:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 10, 2025):

Hello, @chtnnh! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's work together to solve the issue you're experiencing.

To resolve the error you're encountering with poetry.lock, you can regenerate the lock file to ensure it matches the current state of pyproject.toml. Here are the steps you can follow:

  1. Make sure you have poetry installed. If not, you can install it using:

    pip install poetry
    
  2. Navigate to the directory where your pyproject.toml file is located, specifically in the api directory.

  3. Run the following command to regenerate the lock file without updating the locked versions:

    poetry lock -C api --no-update
    
  4. Verify that the poetry.lock file is now in sync with pyproject.toml by running:

    poetry check -C api --lock
    

These steps should help you resolve the error by updating the poetry.lock file to match the current state of pyproject.toml without altering the locked versions [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 10, 2025): <!-- Greeting --> Hello, @chtnnh! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's work together to solve the issue you're experiencing. <!-- Answer --> To resolve the error you're encountering with `poetry.lock`, you can regenerate the lock file to ensure it matches the current state of `pyproject.toml`. Here are the steps you can follow: 1. Make sure you have `poetry` installed. If not, you can install it using: ```bash pip install poetry ``` 2. Navigate to the directory where your `pyproject.toml` file is located, specifically in the `api` directory. 3. Run the following command to regenerate the lock file without updating the locked versions: ```bash poetry lock -C api --no-update ``` 4. Verify that the `poetry.lock` file is now in sync with `pyproject.toml` by running: ```bash poetry check -C api --lock ``` These steps should help you resolve the error by updating the `poetry.lock` file to match the current state of `pyproject.toml` without altering the locked versions <sup>[[1]](https://github.com/langgenius/dify/blob/main/dev/update-poetry)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/dev/sync-poetry)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/b84cb24c-0ced-4f24-9e73-4036a6b1b018?feedback_type=other)</sup>
Author
Owner

@laipz8200 commented on GitHub (Jan 13, 2025):

You can run poetry lock -C api --no-update to fix this, would you like to submit a PR for this fix?

@laipz8200 commented on GitHub (Jan 13, 2025): You can run `poetry lock -C api --no-update` to fix this, would you like to submit a PR for this fix?
Author
Owner

@chtnnh commented on GitHub (Jan 14, 2025):

Yes, would love to! Should I commit the changes in a new branch after running the above command?

@chtnnh commented on GitHub (Jan 14, 2025): Yes, would love to! Should I commit the changes in a new branch after running the above command?
Author
Owner

@laipz8200 commented on GitHub (Jan 14, 2025):

Yes, would love to! Should I commit the changes in a new branch after running the above command?

You need to fork this repo first, then do the changes on your own branch. After that you can create a PR to our main branch! Have fun!

@laipz8200 commented on GitHub (Jan 14, 2025): > Yes, would love to! Should I commit the changes in a new branch after running the above command? You need to fork this repo first, then do the changes on your own branch. After that you can create a PR to our main branch! Have fun!
Author
Owner

@chtnnh commented on GitHub (Jan 14, 2025):

Created the PR!

@chtnnh commented on GitHub (Jan 14, 2025): Created the PR!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7661