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

AttributeError: module 'keyrings.alt' has no attribute 'file' #99

Closed
elig0n opened this issue Feb 9, 2021 · 7 comments
Closed

AttributeError: module 'keyrings.alt' has no attribute 'file' #99

elig0n opened this issue Feb 9, 2021 · 7 comments

Comments

@elig0n
Copy link

elig0n commented Feb 9, 2021

Traceback (most recent call last):
  File "/usr/bin/pb", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pushbullet_cli/app.py", line 94, in main
    if isinstance(keyring.get_keyring(), keyrings.alt.file.EncryptedKeyring):
AttributeError: module 'keyrings.alt' has no attribute 'file'

I found that pb app.py has to explicitly import keyrings.alt.file because neither keyrings.alt nor keyrings.alt.file would be accessible if it simply import keyrings alone.

  • OS: arch linux
  • Python 3.9.1
  • keyring==21.4.0
  • keyrings.alt==4.0.2
@ReneFroger
Copy link

I have the same problem with the keyrings.alt in installation, since Pip can't find the right version.

@GustavoKatel
Copy link
Owner

hi @elig0n can u try installing from the main branch and see if you still have issues with that?

@elig0n
Copy link
Author

elig0n commented Feb 22, 2021

you mean from git or via pip upgrade?

@GustavoKatel
Copy link
Owner

git please

  1. git clone
  2. create a virtualenv to not mess with your current installation
  3. pip install .
  4. try running and see if the error persists

@GustavoKatel
Copy link
Owner

GustavoKatel commented Feb 28, 2021

@ReneFroger @elig0n could try v1.2.1? just pushed to pypi. Feel free to reopen this issue if the problem is still happening

@elig0n
Copy link
Author

elig0n commented Mar 2, 2021

@GustavoKatel seems to work without problems after upgrade to 1.2.1

@elig0n
Copy link
Author

elig0n commented Sep 13, 2022

This issue seems to have returned in version 0.7.5 / 1.2.2 (using Python 3.10)
I have managed to workaround it by manually import every object:

from keyrings.alt.file import EncryptedKeyring, PlaintextKeyring

and then specifically referring to these objects later in the file.

But then when I try to push something I get:

Traceback (most recent call last):
  File "/home/user/.local/bin/pb", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
TypeError: push() got an unexpected keyword argument 'file'                               /0.2s

Click version: 8.1.3

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