nicklasb / gnome-keyring-import-export

A Python-3 variant of https://bitbucket.org/spookylukey/gnome-keyring-import-export
13 stars 4 forks source link

module 'keyring' has no attribute 'list_keyring_names_sync' #2

Closed SmartLayer closed 2 years ago

SmartLayer commented 6 years ago

This is for http://bitbucket.org/spookylukey/gnome-keyring-import-export/ but bitbucket doesn't have an issue tracker:

$ python3 /usr/local/bin/gnome_keyring_import_export.py export /tmp/passfile.json
Traceback (most recent call last):
  File "/usr/local/bin/gnome_keyring_import_export.py", line 214, in <module>
    export_keyrings(sys.argv[2])
  File "/usr/local/bin/gnome_keyring_import_export.py", line 82, in export_keyrings
    f.write(json.dumps(get_gnome_keyrings(), indent=2))
  File "/usr/local/bin/gnome_keyring_import_export.py", line 86, in get_gnome_keyrings
    for keyring_name in keyring.list_keyring_names_sync():
AttributeError: module 'keyring' has no attribute 'list_keyring_names_sync'

One possibility is that your keyring module might be different than what python3 provided (on my Ubuntu 18.04)

$ python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
>>> help(keyring)

Help on package keyring:

NAME
    keyring

PACKAGE CONTENTS
    __main__
    backend
    backends (package)
    cli
    core
    credentials
    devpi_client
    errors
    getpassbackend
    http
    py27compat
    py33compat
    tests (package)
    util (package)

FUNCTIONS
    delete_password(service_name, username)
        Delete the password for the user in the specified service.

    get_keyring()
        Get current keyring backend.

    get_pass_get_password = get_password(prompt='Password: ', stream=None, service_name='Python', username=None)

    get_password(service_name, username)
        Get password from the specified service.

    set_keyring(keyring)
        Set current keyring backend.

    set_password(service_name, username, password)
        Set password for the user in the specified service.

DATA
    __all__ = ('set_keyring', 'get_keyring', 'set_password', 'get_password...

VERSION
    10.6.0

FILE
    /usr/lib/python3/dist-packages/keyring/__init__.py
nicklasb commented 4 years ago

Hi, Just saw this, still relevant?