Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error using gmail api tuto using python 3 "except errors.HttpError, error:"

I get an error with the first line:

except errors.HttpError, error:
   print (f'An error occurred: {error}')
   return None

(The line 2 has been updated for python 3. Only the parenthesis to print are mandatory)

like image 642
JinSnow Avatar asked Mar 01 '17 20:03

JinSnow


1 Answers

You must switch the , with a as:

except errors.HttpError as error:
   print (f'An error occurred: {error}')
   return None
like image 148
JinSnow Avatar answered Oct 05 '22 19:10

JinSnow