-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Cannot delete all rows, get exception.
Library can work on it and fix the behaviour by sending requests in chunks
To Reproduce
on sheet with >1000 rows
rows_to_delete = [row.id_ for row in sheet.rows]
sheet.delete_rows(rows_to_delete)Expected behavior
All rows deleted
Environment (please complete the following information):
- Smartsheet Python SDK Version [3.0.2]
- Python Version [3.10]
trace:
{"response": {"statusCode": 414, "reason": "URI Too Long", "content": "<< text/html; charset=iso-8859-1 content type suppressed >>"}}
Traceback (most recent call last):
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/maksim/git/smartsheet/main.py", line 36, in <module>
sheet.delete_rows(rows_to_delete)
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/smartsheet/models/sheet.py", line 372, in delete_rows
return self._base.Sheets.delete_rows(self.id, object_ids, ignore_rows_not_found)
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/smartsheet/sheets.py", line 309, in delete_rows
response = self._base.request(prepped_request, expected, _op)
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/smartsheet/smartsheet.py", line 255, in request
res = self.request_with_retry(prepped_request, operation)
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/smartsheet/smartsheet.py", line 363, in request_with_retry
native = result.native("Error")
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/smartsheet/smartsheet.py", line 616, in native
error_payload = self.resp.json()
File "/home/maksim/git/smartsheet/venv/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Process finished with exit code 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working