Answer the question
In order to leave comments, you need to log in
How to replace ServiceAccountCredentials?
There is a Python code:
from oauth2client.service_account import ServiceAccountCredentials
Scopes = [ "https://spreadsheets.google.com/feeds", 'https://www.googleapis.com/auth/spreadsheets', "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive" ]
Creds = ServiceAccountCredentials.from_json_keyfile_name("creds.json", Scopes)
Client = gspread.authorize(Creds)
Sheet = Client.open("lol2280").sheet1
Data = Sheet.get_all_records()
Traceback (most recent call last):
File "C:\Users\A4F7~1\Desktop\myProg\myProg.py", line 15, in <module>
File "C:\Users\A4F7~1\Desktop\myProg\oauth2client\service_account.py", line 26, in <module oauth2client.service_account>
File "C:\Users\A4F7~1\Desktop\myProg\oauth2client\crypt.py", line 23, in <module oauth2client.crypt>
File "C:\Users\A4F7~1\Desktop\myProg\oauth2client\_pure_python_crypt.py", line 24, in <module oauth2client._pure_python_crypt>
File "C:\Users\╨Р╨╜╨┤╤А╨╡╨╣\Desktop\myProg\pyasn1_modules\rfc2459.py", line 23, in <module>
from pyasn1.type import opentype
ImportError: cannot import name 'opentype' from 'pyasn1.type' (C:\Users\A4F7~1\Desktop\myProg\pyasn1\type\__init__.py)
Answer the question
In order to leave comments, you need to log in
Who is so smart that he voted for the "Simple Question", but at the same time he cannot answer it himself?
Okay, I already found a solution to the problem myself, I replaced ServiceAccountCredentials with Google API v4
Who needs it, here's the video:
https://youtu.be/4ssigWmExak
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question