I have a gspread project that reads and updates multiple sheets daily suddenly one of the sheets I can update but can't read and getting
APIError: {'code': 500, 'message': 'Internal error encountered.', 'status': 'INTERNAL'}
I get this with only (get , get_batch) functions like :
worksheet.findall('str_example')
worksheet.acell('A1')
here's the error msg :
APIError Traceback (most recent call last) in () ----> 1 cells= worksheet.findall(str_example)
3 frames /usr/local/lib/python3.7/dist-packages/gspread/worksheet.py in findall(self, query, in_row, in_column, case_sensitive) 1717 :rtype: list 1718 """ -> 1719 return list(self._finder(filter, query, case_sensitive, in_row, in_column)) 1720 1721 def freeze(self, rows=None, cols=None):
/usr/local/lib/python3.7/dist-packages/gspread/worksheet.py in _finder(self, func, query, case_sensitive, in_row, in_column) 1634 1635 def _finder(self, func, query, case_sensitive, in_row=None, in_column=None): -> 1636 data = self.spreadsheet.values_get(absolute_range_name(self.title)) 1637 1638 try:
/usr/local/lib/python3.7/dist-packages/gspread/spreadsheet.py in values_get(self, range, params) 179 """ 180 url = SPREADSHEET_VALUES_URL % (self.id, quote(range)) --> 181 r = self.client.request("get", url, params=params) 182 return r.json() 183
/usr/local/lib/python3.7/dist-packages/gspread/client.py in request(self, method, endpoint, params, data, json, files, headers) 84 return response 85 else: ---> 86 raise APIError(response) 87 88 def list_spreadsheet_files(self, title=None, folder_id=None):
APIError: {'code': 500, 'message': 'Internal error encountered.', 'status': 'INTERNAL'}
CodePudding user response:
It was something with Google servers , as after 2 days everything worked fine with me changing the code