微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Google API:AttributeError:模块“时间”没有属性“时钟”

如何解决Google API:AttributeError:模块“时间”没有属性“时钟”

这是我的代码

[[1,2],[4,5,6],[7,8,9,10,11,12]]

我在 from oauth2client.service_account import ServiceAccountCredentials from apiclient import discovery from httplib2 import Http key_path = os.environ["GOOGLE_APPLICATION_CREDENTIALS"] # define scope ScopE = ['https://spreadsheets.google.com/Feeds','https://www.googleapis.com/auth/drive'] # define store credentials = ServiceAccountCredentials.from_json_keyfile_name(key_path,ScopE) # define API service http = credentials.authorize(Http()) drive = discovery.build('drive','v3',http=http) # ERROR HERE 处遇到错误显示错误消息:

属性错误:模块“时间”没有属性“时钟”

我使用的是 Python 3.8。请帮忙。如果需要,我可以上传错误消息。

错误日志:

drive

解决方法

请检查这个答案AttributeError: module 'time' has no attribute 'clock' in Python 3.8

我认为最简单的解决方案是将您的 python 降级到 python 3.7。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。