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)
You must switch the ,
with a as
:
except errors.HttpError as error:
print (f'An error occurred: {error}')
return None
from apiclient import errors, discovery #needed for gmail service