Closed sgkim2 closed 1 year ago
When I checked how my input was being sent to the API, it turned out to be like the following and it resulted in a Response[400] error.
In vip.py
def init_exec():
rq = requests.post(url, headers=headers, json=data_, verify=__certif)
print(data_)
-result {'name': 'r3', 'pipelineIdentifier': 'SimuBloch/0.4', 'inputValues': {'T1': '/vip/Home/API/r3/INPUTS/137_S_0972_pve_gm.nii.gz', 'T2': '/vip/Home/API/r3/INPUTS/137_S_0972_pve_gm.nii.gz', 'TR': '6', 'TE': '3', 'results-directory': '/vip/Home/API/r3/OUTPUTS'}}
Hi expert
When i used VIT in python, i got Error massage that
RuntimeError: 'Error 8000 from VIP : An error has been encountered on the VIP API (Error code 8000)'
I run my code using docker python 3.10
below is my command
python VipSession.init(api_key="**")
session = VipSession(session_name="my_test_ses8_docker”) <<< SESSION 'my_test_ses10_docker' >>> New VIP session
session.upload_inputs(input_dir="/VIT/data/test_upload") <<< UPLOAD INPUTS >>> Uploading your dataset on VIP Cloning: /VIT/data/test_upload ... Created on VIP. 4 files to upload. [1/4] Uploading file: 137_S_0972_pve_gm.nii.gz ... Done. [2/4] Uploading file: 141_S_0717_pve_gm.nii.gz ... Done. [3/4] Uploading file: 137_S_0972_pve_wm.nii.gz ... Done. [4/4] Uploading file: 141_S_0717_pve_wm.nii.gz ... Done.
Everything is on VIP.
session.launch_pipeline(pipeline_id="SimuBloch/0.4", input_settings={"T1": "/vip/Home/API/my_test_ses8_docker/INPUTS/137_S_0972_pve_gm.nii.gz", "T2": "/vip/Home/API/my_test_ses8_docker/INPUTS/137_S_0972_pve_wm.nii.gz", "M0": "/vip/Home/API/my_test_ses8_docker/INPUTS/137_S_0972_pve_gm.nii.gz", "TR": "6", "TE": "3"})
<<< LAUNCH PIPELINE >>>
Checking the data on VIP ... Done.
Done.
Launching 1 new execution(s) on VIP
Session Name: my_test_ses8_docker Pipeline Identifier: SimuBloch/0.4 Started workflows:
(!) Stopped after 0 execution(s).
Session properties were saved in: ./vip_outputs/my_test_ses8_docker/session_data.json
Traceback (most recent call last): File "/VIT/VIP-python-client/VipSession.py", line 353, in launch_pipeline workflow_id = vip.init_exec(self._pipeline_id, self._session_name, self._input_settings) File "/VIT/VIP-python-client/vip.py", line 233, in init_exec manage_errors(rq) File "/VIT/VIP-python-client/vip.py", line 77, in manage_errors raise RuntimeError("Error {} from VIP : {}".format(res[1], res[2])) RuntimeError: Error 8000 from VIP : An error has been encountered on the VIP API (Error code 8000)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "/VIT/VIP-python-client/VipSession.py", line 365, in launch_pipeline
self._handle_vip_error(vip_error)
File "/VIT/VIP-python-client/VipSession.py", line 1672, in _handle_vip_error
raise RuntimeError(interpret)
RuntimeError:
'Error 8000 from VIP : An error has been encountered on the VIP API (Error code 8000)'
Please carefully check that session_name / pipeline_id / input_parameters are valid and do not contain any forbidden character.
If this cannot be fixed, contact VIP support (vip-support@creatis.insa-lyon.fr).
What is wrong..and how can i fix it?