You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the icasdk to link a data id to a bundle.
Here is my python script (I have used the same file as in #2
Details
#!/usr/bin/env python3"""Test link bundle in icasdk"""# Standard Importsfromosimportenvironimportloggingimportjson# ICASDK ImportsimporticasdkfromicasdkimportConfiguration, ApiClient, ApiExceptionfromicasdk.apis.tags.bundle_data_apiimportBundleDataApi# Set GlobalsBUNDLE_ID="46dc94fe-f4a8-47e5-b6fc-074481e0e7e0"DATA_ID="fil.09fd831171954940ece408db581818a8"# Set logginglogging.basicConfig(level=logging.DEBUG)
# Set configurationlogging.info("Set ICAv2 Configuration Construct")
configuration=Configuration(
host=environ["ICAV2_BASE_URL"], # https://ica.illumina.com/ica/restaccess_token=environ["ICAV2_ACCESS_TOKEN"] # icav2 tenants enter umccr-test
)
logging.info("Create api instance context for linking to bundle")
withApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=BundleDataApi(api_client)
try:
# Link data to this bundle.api_response=api_instance.link_data_to_bundle(
path_params={
"bundleId": BUNDLE_ID,
"dataId": DATA_ID
}
)
exceptApiExceptionase:
logging.error("Exception when calling BundleDataApi->link_data_to_bundle: %s\n"%e)
raiseApiException
Where I get the following error (The data does not exist?)
INFO:root:Set ICAv2 Configuration Construct
INFO:root:Create api instance context for linking to bundle
ERROR:root:Exception when calling BundleDataApi->link_data_to_bundle: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Date': 'Fri, 06 Oct 2023 04:22:55 GMT', 'Content-Type': 'application/problem+json', 'Content-Length': '508', 'Connection': 'keep-alive', 'Set-Cookie': 'INGRESSCOOKIE=1949008a2ee59bdcdb33c1b155451c18|82b2b547c6ffaa8346869fdb96dccf96; Max-Age=43200; Path=/ica/rest/api; HttpOnly', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization', 'Access-Control-Max-Age': '7200'})
HTTP response body: b'{"id":"10e1625c-9b7e-42cb-ba36-1f4357e2562d","type":"about:blank","title":"ICA_GNRC_001","status":404,"detail":"Could not find data with ID [fil.09fd831171954940ece408db581818a8]","instance":"http://ica.illumina.com/ica/rest/api/bundles/46dc94fe-f4a8-47e5-b6fc-074481e0e7e0/data/fil.09fd831171954940ece408db581818a8","parameters":{},"timestamp":"2023-10-06T04:22:55Z","method":"POST","userId":"c98710a2-5087-361b-8bfc-4b1ca914cdba","tenantName":"umccr-test","tenantId":"91e1f42c-0afa-47ef-b529-17821ce8bf58"}'
Traceback (most recent call last):
File "/home/alexiswl/PycharmProjects/UMCCR/ica-sdk-python-testing/test_link_bundle.py", line 38, in <module>
api_response = api_instance.link_data_to_bundle(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alexiswl/miniforge3/envs/ica-sdk-python-testing/lib/python3.12/site-packages/icasdk/paths/api_bundles_bundle_id_data_data_id/post.py", line 267, in link_data_to_bundle
return self._link_data_to_bundle_oapg(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alexiswl/miniforge3/envs/ica-sdk-python-testing/lib/python3.12/site-packages/icasdk/paths/api_bundles_bundle_id_data_data_id/post.py", line 214, in _link_data_to_bundle_oapg
raise exceptions.ApiException(api_response=api_response)
icasdk.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Date': 'Fri, 06 Oct 2023 04:22:55 GMT', 'Content-Type': 'application/problem+json', 'Content-Length': '508', 'Connection': 'keep-alive', 'Set-Cookie': 'INGRESSCOOKIE=1949008a2ee59bdcdb33c1b155451c18|82b2b547c6ffaa8346869fdb96dccf96; Max-Age=43200; Path=/ica/rest/api; HttpOnly', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, PATCH, OPTIONS', 'Access-Control-Allow-Headers': 'DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization', 'Access-Control-Max-Age': '7200'})
HTTP response body: b'{"id":"10e1625c-9b7e-42cb-ba36-1f4357e2562d","type":"about:blank","title":"ICA_GNRC_001","status":404,"detail":"Could not find data with ID [fil.09fd831171954940ece408db581818a8]","instance":"http://ica.illumina.com/ica/rest/api/bundles/46dc94fe-f4a8-47e5-b6fc-074481e0e7e0/data/fil.09fd831171954940ece408db581818a8","parameters":{},"timestamp":"2023-10-06T04:22:55Z","method":"POST","userId":"c98710a2-5087-361b-8bfc-4b1ca914cdba","tenantName":"umccr-test","tenantId":"91e1f42c-0afa-47ef-b529-17821ce8bf58"}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alexiswl/PycharmProjects/UMCCR/ica-sdk-python-testing/test_link_bundle.py", line 46, in <module>
raise ApiException
icasdk.exceptions.ApiException: (None)
Reason: None
The text was updated successfully, but these errors were encountered:
alexiswl
changed the title
Cannot link data to bundle with
Cannot link data to bundle with data does not exist error
Oct 6, 2023
Hello,
I am trying to use the icasdk to link a data id to a bundle.
Here is my python script (I have used the same file as in #2
Details
Where I get the following error (The data does not exist?)
The text was updated successfully, but these errors were encountered: