Google云视觉API文本检测谷歌.gax.errors.RetryError:GaxE

2024-05-15 23:01:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我是googleapi的新手。 最近,我使用了Google Vision API,但遇到了以下问题:

google.gax.errors.RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.RESOURCE_EXHAUSTED, Insufficient tokens for quota 'DefaultGroup' and limit 'USER-100s' of service 'vision.googleapis.com' for consumer 'project_number:XXX'.)>)

我尝试了关于“创建服务帐户”的解决方案来生成服务json密钥并在中调用它py.script脚本, 它将首先在3~4个url中工作,但在下一个url中它会出错。 检测我的代码:

^{pr2}$

我援引了检测.py“在另一个py.script脚本公司名称:

detect.detect_text_uri('...')

Tags: ofpy脚本apiurlforthatgoogle
1条回答
网友
1楼 · 发布于 2024-05-15 23:01:35

电话:

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json

或者

^{pr2}$

这将配置您的环境以使用您下载的服务帐户凭据。在

相关问题 更多 >