-
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
'Key "extras" does not exist.' #4665
Comments
Can you share your |
Sure, here it is.
…On Wed, Oct 27, 2021 at 11:51 AM Arun Babu Neelicattu < ***@***.***> wrote:
Can you share your pyproject.toml file and the full output of poetry
install -vvv?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4665 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOFERLGDCO2ZM4AHW3FR5TDUJAUYLANCNFSM5GOWIHBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
hi Arun,
Were you able to take a look at my error? I am not sure what is causing it,
but any suggestions would be greatly appreciated!
On Wed, Oct 27, 2021 at 12:39 PM shervin Abdollahi ***@***.***>
wrote:
… Sure, here it is.
On Wed, Oct 27, 2021 at 11:51 AM Arun Babu Neelicattu <
***@***.***> wrote:
> Can you share your pyproject.toml file and the full output of poetry
> install -vvv?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#4665 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AOFERLGDCO2ZM4AHW3FR5TDUJAUYLANCNFSM5GOWIHBA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
@ShervinAbd92, it doesn't look like you attached your pyproject.toml to this issue. I don't think attachments to email replies to GitHub get added to the GitHub issue. I was running into the same issue, and I eventually figured out it was because I had a TOML key that had a period ( [tool.poetry.scripts]
foo.bar = "myproject.main" which ended up being parsed as something equivalent to [tool.poetry.scripts]
foo = { bar = "myproject.main" } Putting quotes around the key allowed me to work past the issue I was facing, so if you have something similar in your pyproject.toml, you might try adding quotes. |
@richardxia thanks for letting me know how you were able to solve this error. i didn't realize that my attachment didn't get copied here. so i am going to show the content. however, i don't think my error is coming from the same spot, but i might be wrong.
|
I'm just a user of Poetry, and I don't know the internals very well, but I'm curious about this line in your pyproject.toml:
I don't see that format documented anywhere on the documentation website for Poetry. The current section on What happens if you just replace the dictionary with the string that describes the function to call? |
@richardxia thats an interesting point. In my case FCDproc is my package name and cli.py is a script that i have defined a Create_FCD_pipeline function in it. so you i should have it like bellow?
|
No, I think it should be just the following:
The left-hand side of the equals sign is the file name of the executable to create when installing a package, the text in the string before the colon is the package path to the module, and the text after the colon is the function to call. It's similar to the older syntax for console scripts from setuptools: https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html |
oki sure, i can try that. thanks for your suggestion. |
Hi, did you manage to make it work, to know if this issue can be closed? |
I think am having the same issue. I am trying to get scripts #241 working in my project.
When I run
If I take out the I made a note in the other issue also, but the fix I found was to add an extras key and then it worked for me.
|
The syntax for tool.poetry.scripts is at https://python-poetry.org/docs/pyproject/#scripts Nothing else is supported. |
Sorry, maybe the format you're interested in is here: https://python-poetry.org/docs/master/pyproject#scripts |
This issue is not fixed, python-poetry/poetry-core#404 should take care of it. The issue is that before python-poetry/poetry-core#40, the only use of the dictionary format for scripts was to add
has no reason not to be equivalent to
as none of the other uses of toml inline tables in Poetry would distinguish these cases. The Poetry docs weren't updated for python-poetry/poetry-core#40 yet, but from that change, Poetry 1.2 introduced a new use of the dictionary format for scripts, the The code in poetry-core was already mostly-correct (The actual stack-trace hit in the original bug report was fixed in python-poetry/poetry-core#177), so the only missed spot appears to be |
@richardxia
If you want to change any property.
|
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. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Mac Catalina 10.15.7
Poetry version: 1.1.11
Link of a Gist with the contents of your pyproject.toml file:
Issue
after multiple times building & upgrading my python package, poetry gives me a following error when i run poetry install:
Installing dependencies from lock file
Package operations: 0 installs, 6 updates, 0 removals
• Updating importlib-metadata (1.7.0 -> 4.8.1)
• Updating pyrsistent (0.17.3 -> 0.18.0)
• Updating jsonschema (3.2.0 -> 4.1.2)
• Updating charset-normalizer (2.0.0 -> 2.0.7)
• Updating idna (3.1 -> 3.3)
• Updating cffi (1.14.6 -> 1.15.0)
Installing the current project: FCDproc (0.9.0)
NonExistentKey
'Key "extras" does not exist.'
at ~/opt/anaconda3/envs/fcdproc/lib/python3.7/site-packages/tomlkit/container.py:553 in getitem
549│ key = Key(key)
550│
551│ idx = self._map.get(key, None)
552│ if idx is None:
→ 553│ raise NonExistentKey(key)
554│
555│ if isinstance(idx, tuple):
556│ # The item we are getting is an out of order table
557│ # so we need a proxy to retrieve the proper objects
i am not sure why this is coming up now. any suggestion how i can fix this?
The text was updated successfully, but these errors were encountered: