pygsheets icon indicating copy to clipboard operation
pygsheets copied to clipboard

exceeds grid limits. Max rows: 2280, max columns: 178 #124

Open mapeterson opened this issue 3 years ago • 6 comments
trafficstars

From the comments it seems I am facing the same issue even though it is marked as resolved. I am using pip installed version 2.0.5

File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/worksheet.py", line 1465, in get_as_df value_render=value_render, include_tailing_empty_rows=include_tailing_empty_rows) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/worksheet.py", line 494, in get_all_values include_tailing_empty_rows=include_tailing_empty_rows, **kwargs) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/utils.py", line 180, in wrapper return method(self, *args, **kwargs) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/worksheet.py", line 356, in get_values date_time_render_option=date_time_render_option, **kwargs) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/client.py", line 235, in get_range date_time_render_option) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/sheet.py", line 419, in values_get return self._execute_requests(request) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/pygsheets/sheet.py", line 495, in _execute_requests response = request.execute(num_retries=self.retries) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper return wrapped(*args, **kwargs) File "/Users/mapeterson/git/automation-audit/venv/lib/python3.7/site-packages/googleapiclient/http.py", line 937, in execute raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError: <HttpError 400 when requesting https://sheets.googleapis.com/v4/spreadsheets/1gwbN3bLIjG-m2WPlsa7E0kmQGnALog8EObBg8BcGVOc/values/CSR2?majorDimension=ROWS&valueRenderOption=FORMATTED_VALUE&dateTimeRenderOption=SERIAL_NUMBER&alt=json returned "Range (user_map!CSR2) exceeds grid limits. Max rows: 432, max columns: 68". Details: "Range (user_map!CSR2) exceeds grid limits. Max rows: 432, max columns: 68">

mapeterson avatar Feb 23 '22 20:02 mapeterson

@mapeterson The fix for this issue is merged to trunk but is not released. Can you please install pygsheets from GitHub and verify if that fixed your issue?

nithinmurali avatar Feb 24 '22 03:02 nithinmurali

pip install https://github.com/nithinmurali/pygsheets/archive/staging.zip didn't help

mapeterson avatar Mar 06 '22 00:03 mapeterson

Hmm, strange.
what is the name of your sheet, and size of the sheet. Does running wks.get_all_values() throw the same error?

Try changing name of the sheet and check if its working. Try accessing some other sheets and check if its working.

nithinmurali avatar Mar 08 '22 19:03 nithinmurali

Looks like it may be unique to that sheet. I have other sheets that end in a digit and they work fine. I didn't rename the sheet, but I did make a duplicate and called it "CSR2 Copy" and wks.get_all_values() worked. I then made another duplicate and named it to "CSR2 Copy2" and it also worked. But reloading CSR2 gave the same results. The dimensions are 130x26

mapeterson avatar Mar 08 '22 22:03 mapeterson

Hmm, pretty strange. Unless i can reproduce this issue, I wont be able to help. if the data on that sheet is not private (and if you dont mind sharing it). Please share it to [email protected] or imnmfotmal(at)gmail.com.

nithinmurali avatar Mar 10 '22 07:03 nithinmurali

I shared with [email protected]

mapeterson avatar Mar 10 '22 15:03 mapeterson