[Solved] Try except in Python, error still happens
[ad_1] Like stated in the comments: put the relevant code in the try clause, and raise a specific exception. You can prompt again with a loop. Something like this: succeeded = False while not succeeded: try: aws_account = input(“Enter the name of the AWS account you’ll be working in: “) session = boto3.Session(profile_name=aws_account) client = … Read more