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

UnboundLocalError: local variable 'client' referenced before assignment #59

Open
jpveritone opened this issue Jul 20, 2020 · 0 comments

Comments

@jpveritone
Copy link

I've been using mfa.py fine without problem. Its been about 2 week since last used and now running python3 mfa.py --profile wpfc01-usgovwest1 --region us-gov-west-1 I'm getting following error

INFO:modules.logger:Validating credentials for profile: wpfc01-usgovwest1 INFO:modules.logger:Short term credentials section wpfc01-usgovwest1 is missing, obtaining new credentials. WARNING:modules.logger:Your existing credentials are missing or invalid, obtaining new credentials. Failed to get a session with STSThe config profile (dummy) could not be found Traceback (most recent call last): File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 113, in <module> main() File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 104, in main client = vtmfa.get_sts_client(config_settings[1],config_settings[2],args.region, args) File "/Users/jperez/vtdev/aws-mfa/modules/mfa.py", line 88, in get_sts_client return client UnboundLocalError: local variable 'client' referenced before assignment

I tried running with --log-level DEBUG --force hoping for clues but none found.
My ~/.aws/credentials still has
[wpfc01-usgovwest1-long-term] aws_access_key_id = REDACTED aws_secret_access_key = REDACTED aws_mfa_device = REDACTED

Any help/clues would be greatly appreciated

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

1 participant