我正在使用 python 3 和 gspread 库来访问云中的谷歌表。
使用相同的凭据(和相同的 python 脚本以相同的方式运行)它可以在我的计算机上运行,并且不能从同一台计算机上的 docker 映像中运行,相同的凭据。有时它使用 virtualenv(相同的 python 版本)工作,但现在在 docker 容器中我无法弄清楚为什么会这样。相同的凭据 json 配置。
这是我得到的完整错误:
gspread.exceptions.APIError: {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Project is not found and cannot be used for API calls. If it is recently created, enable Drive API by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project= then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/drive.googleapis.com/overvie w?project="
}
],
"code": 403,
"message": "Project is not found and cannot be used for API calls. If it is recently created, enable Drive API by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
}
知道有什么问题吗?
谢谢