Invalid syntax (SyntaxError) in except handler when using comma June 24, 2023 by Tarik Change except InvalidUserPass, e: to except InvalidUserPass as e: See this for more info.