客户端未定义?

时间:2019-12-10 22:14:54

标签: python-3.x

好吧,我正在做这个项目,它将信息输出到Google工作表中。我只是想知道,因为它说:

NameError Traceback (most recent call last)
<ipython-input-18-b31156e96419> in <module>()
      9 
     10 gc = gspread.authorize(GoogleCredentials.get_application_default())
---> 11 sheet = client.open("Passwords").sheet1
     12 
     13 sheet.update_cell(1,1, "yeet")

NameError: name 'client' is not defined

这是代码

first_name = input("Whats your name? ")

from google.colab import auth
auth.authenticate_user()

from oauth2client.service_account import ServiceAccountCredentials
import gspread
from oauth2client.client import GoogleCredentials

gc = gspread.authorize(GoogleCredentials.get_application_default())
sheet = client.open("Passwords").sheet1

sheet.update_cell(1,1, "yeet")

让我知道您能否提供帮助... 谢谢!

0 个答案:

没有答案