I’ve got an instance of XNAT 1.7 running on a server and I have configured a docker image plugin for dcm2bids (github) and installed the docker image on the server (by doing “docker pull xnat/dcm2bids-session”). I’ve also automatised the launching of the command for when a session is archived (SessionArchived event)
The problem is every time I upload a new subject, the image gets launched but it fails.
The command-line command looks like this:
python dcm2bids_wholeSession.py --session XNAT_E00011 --overwrite False --host $XNAT_HOST --user $XNAT_USER --pass $XNAT_PASS --upload-by-ref False --dicomdir /dicom --niftidir /nifti
The contents of StdOut.log are:
Making DICOM directory /dicom Making NIFTI image directory /nifti/IMG Making NIFTI BIDS directory /nifti/BIDS Get project and subject ID for session ID XNAT_E00011. Request Failed HTTPSConnectionPool(host='$xnat_host', port=443): Max retries exceeded with url: /data/experiments XNAT_E00011?handler=values&columns=project%2Csubject_ID&format=json (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',))
And the enviromental variables look as follows:
I have the impression that the problem is that the host is not being prepended in the URL the images uses to query the project and subject ID. I also noted that the host variable in the HTTPSConnectionPool request looks like $xnat_host (in lowercase) and that the port is 443 instead of 8080. What might I be doing wrong? Do I have to somehow configure the host and port so they get correctly filled out in the python script?
Thanks a lot!