amazon-ses-developer-guide
amazon-ses-developer-guide copied to clipboard
Syntax error on Python script?
I'm trying to use the Python script on the guide page and running into a syntax error:
$ python3 ./smtp_creds.py wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY us-east-1
File "./smtp_creds.py", line 39
raise ValueError(f"The {region} Region doesn't have an SMTP endpoint.")
^
SyntaxError: invalid syntax
Hi Purdy,
What version of python are you using? When I used python 2.7, I could replicate the error.
python ./smtp_creds.py wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY us-east-1
File "./smtp_creds.py", line 39
raise ValueError(f"The {region} Region doesn't have an SMTP endpoint.")
^
SyntaxError: invalid syntax
But when I used python 3.6 and 3.7, it was working.
python3 ./smtp_creds.py wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY us-east-1
BLBM/9hSUELfq8Gw+rU1YcBjkOxGbhT2XG763xVLGWL9
That was it ... I was using a default python on my computer, which was v2. v3 works.
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the "awsdocs" org), see the announcement on the AWS News Blog.