Jaron Sander
Jaron Sander

Reputation: 1

gspread.exceptions.APIError error code 500

I am using the python gspread library to get information off of google sheets. I have had no prior problems accessing any sheets but one sheet keeps throwing this error with doc.worksheet("{worksheet_name}") or doc.worksheets():

gspread.exceptions.APIError: { "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } }

I have ruled out the following possible causes:

I even created a copy of the doc and tried to access that and the same error occurred.

Upvotes: 0

Views: 7413

Answers (3)

zizy_Tochy
zizy_Tochy

Reputation: 11

This error is caused because the data is large.You can improvise by uploading the data in chunks but you need to add rows to the sheet of the additional chunks and specify the range in the sheet you want to append the data i.e

worksheet.update([[]]) #list of lists of first chunk
worksheet.add_rows() #number of rows you want to append
worksheet.update(range,[[]]) #range where you want to place the second chunk and list of the lists of the second chunk

Upvotes: 1

Leandro Conti
Leandro Conti

Reputation: 21

You can use a 100 second delay every 100 requests

Usage limit

Upvotes: 2

jdalzatec
jdalzatec

Reputation: 11

Well, I had the same error. I just created another spreadsheet and it worked.

Upvotes: 0

Related Questions