首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在虚拟窗口上使用google-cloud-vision api的带有时间框架的无效JWT错误

在虚拟窗口上使用google-cloud-vision api的带有时间框架的无效JWT错误
EN

Stack Overflow用户
提问于 2019-07-08 06:52:43
回答 1查看 191关注 0票数 0

我在virtualbox上安装了windows7,以便在我的activeX服务器的activeX网页上使用。

使用进行身份验证,在身份验证过程中出现以下错误:

代码语言:javascript
复制
google.api_core.exceptions.ServiceUnavailable: 503 Getting metadata from plugin failed with error: ('invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems.')

Windows Internet时间同步,时间是同步的,但会发生错误。但普通Windows上的代码相同,不会发生错误。

代码语言:javascript
复制
client = vision.ImageAnnotatorClient()

imgByteArr = io.BytesIO()
textImage.save(imgByteArr, format='PNG')
content = imgByteArr.getvalue()

image = types.Image(content=content)

response = client.text_detection(image=image)
labels = response.text_annotations
print(labels[0].description)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-10 11:57:29

故障排除:重置主机os时间(设置NTP)

问题是主机操作系统和来宾操作系统之间的时间差。

代码语言:javascript
复制
ln -sf / usr / share / zoneinfo / Asia / Seoul / etc / localtime
rdate -s time.bora.net
hwclock --systohc
date
hwclock

time.bora.net,查找并配置适当的ntp(网络时间协议)服务器。适合你的区域

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56929699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档