I have a python script that gets information from a Google Spreedsheet using gspread.
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()
this is part of script that is contatly running, but the gspread part only runns on a few ocations during the day.
this all works, but if i try to use the same credentials on another script to access the same sheet, i get an error that i dont have permision.
My understanding of the problem is that the first script is not closing the connection, hence i can't log in with the same credentials.
i can't find anywhere information on how this can be closed ?