python-o365 icon indicating copy to clipboard operation
python-o365 copied to clipboard

Optimistic concurrency failure during fragmented upload

Open ghost opened this issue 4 years ago • 0 comments

Not sure what causes the following error, got it at least 2-3 times as of now:

Traceback (most recent call last):
    folder.upload_file(item=item_name, item_name=file_name)
  File "/home/user/.local/lib/python3.9/site-packages/O365-2.0.16-py3.9.egg/O365/drive.py", line 1348, in upload_file
    return write_stream(file)
  File "/home/user/.local/lib/python3.9/site-packages/O365-2.0.16-py3.9.egg/O365/drive.py", line 1333, in write_stream
    response = self.con.naive_request(upload_url, 'PUT',
  File "/home/user/.local/lib/python3.9/site-packages/O365-2.0.16-py3.9.egg/O365/connection.py", line 787, in naive_request
    return self._internal_request(self.naive_session, url, method, **kwargs)
  File "/home/user/.local/lib/python3.9/site-packages/O365-2.0.16-py3.9.egg/O365/connection.py", line 764, in _internal_request
    raise HTTPError('{} | Error Message: {}'.format(e.args[0], error_message), response=response) from None
requests.exceptions.HTTPError: 416 Client Error: Requested Range Not Satisfiable for url:* | Error Message: Optimistic concurrency failure during fragmented upload

After retrying everything works correctly with the file being the same, so strange.

ghost avatar Dec 03 '21 20:12 ghost