-
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
Unclear error report: KeyError 'name' #8122
Comments
diff --git a/src/poetry/factory.py b/src/poetry/factory.py
index 5e926b61..be6870f3 100644
--- a/src/poetry/factory.py
+++ b/src/poetry/factory.py
@@ -367,9 +367,10 @@ class Factory(BaseFactory):
dependencies = {canonicalize_name(d) for d in dependencies}
- if canonicalize_name(config["name"]) in dependencies:
+ project_name = config.get("name")
+ if project_name is not None and canonicalize_name(project_name) in dependencies:
results["errors"].append(
- f"Project name ({config['name']}) is same as one of its dependencies"
+ f"Project name ({project_name}) is same as one of its dependencies"
)
return results should fix it pull requests welcome, I'm sure |
This comment was marked as off-topic.
This comment was marked as off-topic.
@kevinzeidler that is completely different, please don't hijack this issue |
You're right, my bad. Wasn't reading the stack traces carefully enough. |
Same here! Not sure how to workaround the issue. |
Whelp getting this error too. |
Alright so what I gathered is
This was my pyproject.toml. I added the section
Which is really just a duplicate of the |
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) and have included the output below.Issue
When I try poetry commands I get a failure with unhelpful output:
If I use
-vvv
it seems this is a KeyError emanating from inside poetry:This is probably because of something amiss in my
pyproject.toml
but the error message provides no indication of what.The text was updated successfully, but these errors were encountered: