-
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
AttributeError when adding a dependency group when private repo present (Poetry 1.2.0a2) #4718
Comments
Did some more investigation. This error only happens if the
(Notice that I noticed this because I was trying to create the above test case using a different command instead of the append |
I have the same error, also on version Poetry (version 1.2.0a2) but for me it occurs when references a local library ie Can be traced back to the update 1.2.0a2 here: 4b8384c#diff-8005012c00c842592c28b01560b1f9522146f351b70df58fadfec5c0245bd523 Unsure of the specifics, but it if you don't have a previously toml [tool.poetry.group] (or an tool.poetry.group.whatever.dependencies poetry/poetry/console/commands/add.py Lines 105 to 114 in 4b8384c
|
An error in the same line happened with me when trying to add a new dev dependency to a project that was created with Poetry v1.1.11. Replacing |
I can reproduce quickly this with
on
produces
I confirm that moving the |
Same here on |
Root cause is at python-poetry/tomlkit#196 |
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. |
-vvv
option).Not on latest, because I am on 1.2.0a2, which is newer than latest.
Issue
When using a private repo (i.e. having a
[[tool.poetry.source]]
section to pyproject.toml), and adding a group dependency (e.g. runningpoetry add --group test pytest
, e.g. the feature added in #4260) for a group that does not yet exist in the pyproject.toml, poetry raises an exception.Even though the example above has an invalid URL for the poetry source, this error happens even when the URL is valid and the necessary credentials to authenticate are present (e.g. a valid Google Artifact Repository repo), and regardless of whether the source is primary or secondary.
Also note that the dependency being added isn't even hosted inside the private repo. (In this case, trying to add pytest to a group called "test".)
Removing the
[[tool.poetry.source]]
section allows Poetry to properly add the dependency group and dependency.The above pyproject.toml was generated using the following:
Full output when running with -vvv
The text was updated successfully, but these errors were encountered: