且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

尝试在 Python 中运行 Gmail API 快速入门时出现属性错误

更新时间:2023-11-15 13:45:04

我遇到了一个非常相似的问题,尽管使用的是完全不同的 API(计算引擎).我最终将 google api 客户端回滚到以前的版本 - 1.3.2 - 而不是最新的 - 1.4.0.为此,我跑了:

I ran into a very similar problem, albeit using a completely different API (compute engine). I ended up rolling back the google api client to the previous version - 1.3.2 - as opposed to the latest - 1.4.0. To do this, I ran:

sudo pip install -I google-api-python-client==1.3.2

然后能够运行我的代码.

And was then able to run my code.

我不确定这是否是同样的问题,但它似乎对我有用,希望这会有所帮助.

I'm not sure if this is the same problem, but it seems to have done the trick for me, hope this helps.