2021年2月4日星期四

Google API : AttributeError: module 'time' has no attribute 'clock'

This is my code :

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  

I'm hitting error at drive with error message :

AttributeError: module 'time' has no attribute 'clock'

I'm using Python 3.8. Please help. I can upload error message if needed.

https://stackoverflow.com/questions/66056550/google-api-attributeerror-module-time-has-no-attribute-clock February 05, 2021 at 09:58AM

没有评论:

发表评论