第一行出现错误:
except errors.HttpError, error:
print (f'An error occurred: {error}')
return None
(第 2 行已针对 python 3 进行了更新。只有要打印的括号是必需的)
请您参考如下方法:
您必须将 , 切换为 as:
except errors.HttpError as error:
print (f'An error occurred: {error}')
return None
