I have been trying to download all the data files recursively but I get error with both python and command line.
Python:
files = synapseutils.syncFromSynapse(syn, 'syn20948839')
Traceback (most recent call last):
File "", line 1, in
File "/opt/common/CentOS_6-dev/python/python-2.7.10/lib/python2.7/site-packages/synapseutils/sync.py", line 42, in syncFromSynapse
for result in results:
File "/opt/common/CentOS_6-dev/python/python-2.7.10/lib/python2.7/site-packages/synapseclient/client.py", line 1441, in chunkedQuery
response = self.restGET('/query?query=' + quote(subqueryStr))
File "/opt/common/CentOS_6-dev/python/python-2.7.10/lib/python2.7/site-packages/synapseclient/client.py", line 3394, in restGET
exceptions._raise_for_status(response, verbose=self.debug)
File "/opt/common/CentOS_6-dev/python/python-2.7.10/lib/python2.7/site-packages/synapseclient/exceptions.py", line 140, in _raise_for_status
raise SynapseHTTPError(message, response=response)
synapseclient.exceptions.SynapseHTTPError: 404 Client Error:
GET /repo/v1/query was not found. Please reference API documentation at https://docs.synapse.org/rest/
Command line:
synapse get -r syn20948839
UPGRADE AVAILABLE
A more recent version of the Synapse Client (1.9.3) is available. Your version (1.6.1) can be upgraded by typing:
pip install --upgrade synapseclient
Python Synapse Client version 1.9.3 release notes
https://python-docs.synapse.org/build/html/news.html
Synapse username: juberpatel
Password for juberpatel:
UPGRADE AVAILABLE
A more recent version of the Synapse Client (1.9.3) is available. Your version (1.6.1) can be upgraded by typing:
pip install --upgrade synapseclient
Python Synapse Client version 1.9.3 release notes
https://python-docs.synapse.org/build/html/news.html
Welcome, Juber Patel!
SynapseHTTPError: 404 Client Error:
GET /repo/v1/query was not found. Please reference API documentation at https://docs.synapse.org/rest/
Created by Juber Patel juberpatel Hi @juberpatel ,
Yes that is expected. That being said, you can specify `path` and have it downloaded to a directory of your choice:
```
files = synapseutils.syncFromSynapse(syn, 'syn20948839', path="/path/of/your/choice/")
```
Best,
Tom thanks, that worked.
Synapse downloads individual files in folders inside .synapseCache instead of preserving the folder structure that is visible on this site. Is this expected? Dear @juberpatel,
Please update your python client by doing:
```
pip install --upgrade synapseclient
```
Best,
Tom
Drop files to upload
Unable to download data recursively page is loading…