-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 self
commands cannot be executed: Expected newline or end of document after a statement
#7885
Comments
#7705 has been merged into master, but is not included in a release. Only minor releases (e.g. 1.4.0, 1.5.0) may be built from master. Patch releases (e.g. 1.4.1, 1.4.2) are built from the corresponding release branch (e.g. 1.4). You have to try poetry@master in order to check if #7705 solves your issue. Further, IIRC #7705 only makes sure that the pyproject.toml file is written correctly. pyproject.toml files with invalid line endings may still cause issues and should be fixed manually (once). |
Hi all, |
Yes, I suppose you have to fix the pyproject.toml manually. Afterwards, the issue should not appear again if you use poetry 1.5 or later. |
Hi again, sorry I don't think I'm following what actually needs to be fixed. I get the same problem as @Predeactor. Any idea what line needs to be added/changed? |
IIRC, you have to replace |
Fixed after updating to This will still require a manual edit in the
Hope this settle things down. :) |
I'm getting a similar error, but I genuinely don't see any extra lines in either the pyproject.toml associated with poetry or my specific app. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Poetry version: 1.4.2
Python version: 3.10.8
OS version and name: Windows 11 Version 10.0.22621 Build 22621
pyproject.toml: https://gist.github.com/Predeactor/c6c4ae3cda2939a2dc02f43126da5721 (Note: Spaces were removed)
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
This issue appears to be related to #7705 and #6457, which seems to be code that has been merged (By the end of March) and published to PyPI (By the beginning of April), but still appears to happen.
This exception seems to happen for every
poetry self
commands.I tried everything I could and looked for issues/PRs fixing this, but unfortunately, there's nothing helping me, I'm sadly opening this issue even if there already was one that existed…
The text was updated successfully, but these errors were encountered: