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

Using keystore has unicode issue #72

Open
stevemac007 opened this issue Apr 5, 2018 · 1 comment
Open

Using keystore has unicode issue #72

stevemac007 opened this issue Apr 5, 2018 · 1 comment

Comments

@stevemac007
Copy link
Contributor

I've successfully logged in and stored a password in the keystore, when I attempt to reauthenticate it fails with a unicode issue.

$ aws-google-auth -p cevo-dev --duration 43200 -k
Failed to import U2F libraries, U2F login unavailable. Other methods can still continue.
Traceback (most recent call last):
  File "/usr/local/bin/aws-google-auth", line 11, in <module>
    load_entry_point('aws-google-auth', 'console_scripts', 'aws-google-auth')()
  File "/Users/steve.mactaggart/development/cevo/aws-google-auth/aws_google_auth/__init__.py", line 224, in main
    cli(cli_args)
  File "/Users/steve.mactaggart/development/cevo/aws-google-auth/aws_google_auth/__init__.py", line 63, in cli
    process_auth(args, config)
  File "/Users/steve.mactaggart/development/cevo/aws-google-auth/aws_google_auth/__init__.py", line 181, in process_auth
    config.raise_if_invalid()
  File "/Users/steve.mactaggart/development/cevo/aws-google-auth/aws_google_auth/configuration.py", line 117, in raise_if_invalid
    assert (self.password.__class__ is str), "Expected password to be a string. Got {}.".format(self.password.__class__)

AssertionError: Expected password to be a string. Got <type 'unicode'>.
@bsideup
Copy link

bsideup commented May 10, 2018

I can confirm. Python 2

Workaround: change aws_google_auth/__init__.py, in process_auth, replace:

config.password = keyring_password

with:

config.password = str(keyring_password)

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

2 participants