gspread.exceptions.APIError error code 500
Well, I had the same error. I just created another spreadsheet and it worked.
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:

program doesn't have access to the doc
too many worksheets in the doc
over api limit

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