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

ItemNotFoundException error #383

Closed
brunobraga opened this issue Jul 22, 2018 · 3 comments
Closed

ItemNotFoundException error #383

brunobraga opened this issue Jul 22, 2018 · 3 comments

Comments

@brunobraga
Copy link

I tried the good old StackOverflow (here) before bothering you guys.

Basically, I got a virtual machine with a clean copy of Ubuntu 18.04 64-bits, and tried to use twine in Python 2.7.15rc1 to update an old package to Pypi.

This is the error I am getting:

> python setup.py sdist bdist_wheel
> # this works fine

> twine upload dist/*
> # returns:
> Uploading distributions to https://upload.pypi.org/legacy/
> Enter your username: XXXXXXXXXX
> ItemNotFoundException: Item does not exist!

I checked the twine source code and realised there is no such error documented. Digging deeper, I found that this is being thrown by the twine/utils.py file functools.partial function... from the stack trace: (ignore the twine line numbers as I add a few debugging points throughout the file)

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twine-1.11.1BB-py2.7.egg/twine/utils.py", line 202, in get_userpass_value
a = prompt_strategy()
File "/usr/local/lib/python2.7/dist-packages/twine-1.11.1BB-py2.7.egg/twine/utils.py", line 235, in password_from_keyring_or_prompt
get_password_from_keyring(system, username)
File "/usr/local/lib/python2.7/dist-packages/twine-1.11.1BB-py2.7.egg/twine/utils.py", line 223, in get_password_from_keyring
import keyring
File "/usr/lib/python2.7/dist-packages/keyring/init.py", line 3, in
from .core import (set_keyring, get_keyring, set_password, get_password,
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 153, in
init_backend()
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 66, in init_backend
keyrings = filter(limit, backend.get_all_keyring())
File "/usr/lib/python2.7/dist-packages/keyring/util/init.py", line 21, in wrapper
func.always_returns = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 196, in get_all_keyring
exceptions=TypeError))
File "/usr/lib/python2.7/dist-packages/keyring/util/init.py", line 31, in suppress_exceptions
for callable in callables:
File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 188, in is_class_viable
keyring_cls.priority
File "/usr/lib/python2.7/dist-packages/keyring/util/properties.py", line 24, in get
return self.fget.get(None, owner)()
File "/usr/lib/python2.7/dist-packages/keyring/backends/SecretService.py", line 38, in priority
list(secretstorage.get_all_collections(bus))
File "/usr/lib/python2.7/dist-packages/secretstorage/collection.py", line 149, in get_all_collections
yield Collection(bus, collection_path)
File "/usr/lib/python2.7/dist-packages/secretstorage/collection.py", line 43, in init
signature='ss')
File "/usr/lib/python2.7/dist-packages/secretstorage/util.py", line 34, in function_out
raise ItemNotFoundException('Item does not exist!')
ItemNotFoundException: Item does not exist!

From the error, I figure that playing with the keyring instead will probably be my quick fix, but I thought to mention this here in case others find similar issue.

Thanks,

@brunobraga
Copy link
Author

Found the issue, which was with keyring installation (D-Bus, etc). Coming from a fresh install, I was surprised the amount of additional packages required to make this work. Regardless, "twine" could implement a better error handling in the keyring not properly installed exception, rather than the error of another package altogether.

@crwilcox
Copy link

crwilcox commented May 7, 2019

This seems to need to be verified and closed?

@di
Copy link
Sponsor Member

di commented Jul 23, 2019

This seems like a duplicate of jaraco/keyring#316. If it still persists, an issue should be raised in the keyring issue tracker instead.

The issue of short exception messages without stacktraces was fixed in #397.

@di di closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants