Hi,
I am interested in downloading data for a syn51365303 project. I copy the code from the download cart and use it and it doesn't work. Please help, because somehow I can't see clicking over 1400 times to download each record in turn.
My code:
import synapseclient
syn = synapseclient.login() #I'm connecting using token
dl_list_file_entities = syn.get_download_list()
My error:
dl_list_file_entities = syn.get_download_list()
Traceback (most recent call last):
File "", line 1, in
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 1452, in get_download_list
dl_list_path = self.get_download_list_manifest()
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 1429, in get_download_list_manifest
manifest = self._generate_manifest_from_download_list()
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 1422, in _generate_manifest_from_download_list
return self._waitForAsync(uri="/download/list/manifest/async", request=request_body)
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 3245, in _waitForAsync
async_job_id = self.restPOST(uri+'/start', body=json.dumps(request), endpoint=endpoint)
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 4052, in restPOST
response = self._rest_call('post', uri, body, endpoint, headers, retryPolicy, requests_session, **kwargs)
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 4019, in _rest_call
self._handle_synapse_http_error(response)
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/client.py", line 3989, in _handle_synapse_http_error
exceptions._raise_for_status(response, verbose=self.debug)
File "/root/anaconda3/lib/python3.10/site-packages/synapseclient/core/exceptions.py", line 160, in _raise_for_status
raise SynapseHTTPError(message, response=response)
synapseclient.core.exceptions.SynapseHTTPError: 403 Client Error:
insufficient_scope. Request lacks scope(s) required by this service: download, modify
Best regards,
Anna
Created by Anna Ledwo? AnnaLedwon Hi @AnnaLedwon,
When you create a personal access token, please make sure you check all three boxes which will then allow you to do download/upload/admin operations within synapse. Please create a new personal access token with all three scopes checked and try to download the files with the new token.
Best,
Tom
Drop files to upload
syn51365303 project - fail to download data page is loading…