Jin*_*now 1 python python-3.x gmail-api
第一行出现错误:
except errors.HttpError, error:
print (f'An error occurred: {error}')
return None
Run Code Online (Sandbox Code Playgroud)
(第2行已针对python 3更新。只有要打印的括号是必需的)
您必须切换,使用as:
except errors.HttpError as error:
print (f'An error occurred: {error}')
return None
Run Code Online (Sandbox Code Playgroud)