You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to put my username in single quotes in order to get get_token_example.py to work (see below). Not sure if there's something unique to my environment, but it might be worth including a note in the README.
`
(awscli) [adamt@felix python]$ python get_token_example.py
Enter your NIMH Data Archives username:adamt
Traceback (most recent call last):
File "get_token_example.py", line 6, in
username = input('Enter your NIMH Data Archives username:')
File "", line 1, in
NameError: name 'adamt' is not defined
(awscli) [adamt@felix python]$
(awscli) [adamt@felix python]$ python get_token_example.py
Enter your NIMH Data Archives username:'adamt'
Enter your NIMH Data Archives password:
aws_access_key_id=XXX
aws_secret_access_key=XXX
security_token=XXX
expiration=2018-05-03T04:04:48-04:00
(awscli) [adamt@felix python]$
`
The text was updated successfully, but these errors were encountered:
Thanks for the feedback! Python is attempting to automatically eval what is read here which is causing the NameError, the current example script is mixing Python 3 and 2 concepts (raw_input from 2 was renamed to input in 3 in PEP 3111).
In Python 2 environments you can replace input with raw_input to prevent this problem and avoid having to quote your username.
I needed to put my username in single quotes in order to get get_token_example.py to work (see below). Not sure if there's something unique to my environment, but it might be worth including a note in the README.
`
(awscli) [adamt@felix python]$ python get_token_example.py
Enter your NIMH Data Archives username:adamt
Traceback (most recent call last):
File "get_token_example.py", line 6, in
username = input('Enter your NIMH Data Archives username:')
File "", line 1, in
NameError: name 'adamt' is not defined
(awscli) [adamt@felix python]$
(awscli) [adamt@felix python]$ python get_token_example.py
Enter your NIMH Data Archives username:'adamt'
Enter your NIMH Data Archives password:
aws_access_key_id=XXX
aws_secret_access_key=XXX
security_token=XXX
expiration=2018-05-03T04:04:48-04:00
(awscli) [adamt@felix python]$
`
The text was updated successfully, but these errors were encountered: