We're updating the issue view to help you get more done. 

file download fails when temp file exists and is complete

Description

To repro:
create a copy of a downloaded file with the name of the temp file. E.g. I copied:

1 .synapseCache/221/14628221/someothername.txt

to

1 .synapseCache/221/14628221/someothername.txt.synapse_download_14628221

Now:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 >>> syn.get("syn7072010") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 695, in get return self._getWithEntityBundle(entityBundle=bundle, entity=entity, **kwargs) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 784, in _getWithEntityBundle self._download_file_entity(downloadLocation, entity, ifcollision, submission) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 841, in _download_file_entity downloadPath) File "/usr/local/lib/python3.5/site-packages/synapseclient/client.py", line 1847, in _downloadFileHandle raise exc_info[0](exc_info[1]) synapseclient.exceptions.SynapseHTTPError: 416 Client Error: Requested Range Not Satisfiable <?xml version="1.0" encoding="UTF-8"?> <Error><Code>InvalidRange</Code><Message>The requested range is not satisfiable</Message><RangeRequested>bytes=200-</RangeRequested><ActualObjectSize>200</ActualObjectSize><RequestId>72BBAAF376BC70A8</RequestId><HostId>2m/zLsu9q8RdYcE6vVDZDEVgtnUwsLJyw+6kAowvlHXaTB04xdMRz/GQvchAWMElc4RKAHZMTWs=</HostId></Error>

The client should realize that the temp file is complete and not to make the illegal range request.

Environment

Status

Assignee

Ziming Dong

Reporter

Bruce Hoff

Validator

Bruce Hoff

Fix versions

Priority

Major