Python 关闭gspread上的连接
我有一个python脚本,它使用gspread从googlespreedsheet获取信息Python 关闭gspread上的连接,python,gspread,Python,Gspread,我有一个python脚本,它使用gspread从googlespreedsheet获取信息 scope = ['https://spreadsheets.google.com/feeds'] creds = ServiceAccountCredentials.from_json_keyfile_name('client_secret.json', scope) client = gspread.authorize(creds
scope = ['https://spreadsheets.google.com/feeds']
creds = ServiceAccountCredentials.from_json_keyfile_name('client_secret.json', scope)
client = gspread.authorize(creds)
sheet_programar = client.open("FILE").worksheet("SHEET")
# Extract and print all of the values
list_of_hashes = sheet_programar.get_all_records()
这是持续运行的脚本的一部分,但gspread部分在一天中仅在少数位置上运行
这一切都是可行的,但如果我试图在另一个脚本上使用相同的凭据来访问同一个工作表,我会得到一个错误,即我没有权限
我对问题的理解是,第一个脚本没有关闭连接,因此我无法使用相同的凭据登录
我在任何地方都找不到有关如何关闭的信息?您找到解决方案了吗?我也有同样的问题。这个问题还是没有解决办法?