E
E
Egor Frolov2020-12-08 19:45:59
Python
Egor Frolov, 2020-12-08 19:45:59

gspread not working.?

import gspread
from oauth2client.service_account import ServiceAccountCredentials

scope = ['https://spreadsheets.google.com/feeds',
         'https://www.googleapis.com/auth/drive']

credentials = ServiceAccountCredentials.from_json_keyfile_name('12345.json', scope)

gc = gspread.authorize(credentials)
sh = gc.open("1E74NCfYUNfbsMcs_1GrRKunNdc4NH4OtgDVN4J8G4_Q")
print(sh.sheet1.get('A2'))


gives error gspread.exceptions.SpreadsheetNotFound
access i gave qiR9_2lRWOA.jpg?size=644x102&quality=96&proxy=1&sign=2bdbbd5dd633ab4d29878f03545de323

i dont know what is the problem just

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MagaSim, 2020-12-08
@MagaSim

Maybe this example will help

temp_spread_sheet = gc.open_by_url(
    "https://docs.google.com/spreadsheets/d/1E74NCfYUNfbsMcs_1GrRKunNdc4NH4OtgDVN4J8G4_Q/")

# загружаем лист с списком учеников и токенов
auth_list = temp_spread_sheet.worksheet("Sheet1")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question