Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
chtnnh opened this issue Jan 10, 2025 · 5 comments
Closed
5 tasks done

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

chtnnh opened this issue Jan 10, 2025 · 5 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@chtnnh
Copy link

chtnnh commented Jan 10, 2025

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.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jan 10, 2025
Copy link

dosubot bot commented 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

@laipz8200
Copy link
Member

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

@chtnnh
Copy link
Author

chtnnh commented Jan 14, 2025

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

@laipz8200
Copy link
Member

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!

@chtnnh
Copy link
Author

chtnnh commented Jan 14, 2025

Created the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants