Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[imaging_uploader] Loris-MRI - imaging pipeline fails #8623

Closed
regisoc opened this issue Apr 12, 2023 · 1 comment
Closed

[imaging_uploader] Loris-MRI - imaging pipeline fails #8623

regisoc opened this issue Apr 12, 2023 · 1 comment
Assignees
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@regisoc
Copy link
Contributor

regisoc commented Apr 12, 2023

Describe the bug

A bug on Loris-MRI side that blocks the imaging pipeline execution.
Execution fails, but nothing is visible on the UI side.

To Reproduce

You need back-end access to run scripts. By blocking the auto-launch config (ImagingUploaderAutoLaunch = No), pipeline can be triggered server-side after uploading a file.

Steps to reproduce the behavior (attach screenshots if applicable):
2. Go to menu > admin > configuration
3. Click on 'Study'
4. Change the ImagingUploaderAutoLaunch to No
5. Go back to the imaging_uploader (menu > imaging > imaging_uploader)
6. Go to upload tab and upload an valid archive
7. Connect to back-end.
8. Execute the following script by changing the upload_id (visible on the UI side for your file) and path_to_file (path to the uploaded file) arguments to run the imaging pipeline inside Loris-MRI that should end with the mentioned error:

(loris-mri-python env) user@machine:/opt/Loris-MRI/bin/mri$ perl uploadNeuroDB/imaging_upload_file.pl -profile prod -upload_id 132 -verbose /data/incoming/$user_upload_folder/DCC090_587630_V1.tar.gz

 find \/tmp\/ImagingUpload\-9\-46\-wPzJP8 -name '__MACOSX' -exec rm -rf {} +  
Use of uninitialized value $living_phantom_regex in concatenation (.) or string at /opt/Loris-MRI/bin/mri/uploadNeuroDB/NeuroDB/ImagingUpload.pm line 298.

dicomTar.pl \/tmp\/ImagingUpload\-9\-46\-wPzJP8 \/data\/Loris\-MRI\/data\/tarchive -database -profile prod -verbose 
 Source: /tmp/ImagingUpload-9-46-wPzJP8
Target: /data/Loris-MRI/data/tarchive

Testing for database connectivity.
Database is available.

You will archive the dir		: ImagingUpload-9-46-wPzJP8

You are creating a tar with the following command:
        
tar -cf /data/Loris-MRI/data/tarchive/ImagingUpload-9-46-wPzJP8.tar ImagingUpload-9-46-wPzJP8


getting md5sums and gzipping!!

* Taken from dir                   :    /tmp/ImagingUpload-9-46-wPzJP8
* Archive target location          :    /data/Loris-MRI/data/tarchive/DCM_2016-08-17_ImagingUpload-9-46-wPzJP8.tar
* Name of creating host            :    ip
* Name of host OS                  :    Linux
* Created by user                  :    user
* Archived on                      :    2023-04-12 09:47:01
* dicomSummary version             :    1
* dicomTar version                 :    1
* md5sum for DICOM tarball         :    e6ca5d1b495a2ae3c88a33291ab3ec46  ImagingUpload-9-46-wPzJP8.tar
* md5sum for DICOM tarball gzipped :    456bfef47a592f9729a71b65bb4b0f4c  ImagingUpload-9-46-wPzJP8.tar.gz
* md5sum for complete archive      :    bd51f19d7766200ddd857f11cebe29e5  DCM_2016-08-17_ImagingUpload-9-46-wPzJP8.tar

Adding archive info into database

Removing temporary files from target location


Done adding archive info into database

\/opt\/Loris\-MRI\/bin\/mri/uploadNeuroDB/tarchiveLoader.pl -profile prod \/data\/Loris\-MRI\/data\/tarchive\/DCM_2016\-08\-17_ImagingUpload\-9\-46\-wPzJP8\.tar -uploadID 132 -verbose 
 md5sum /data/Loris-MRI/data/tarchive/DCM_2016-08-17_ImagingUpload-9-46-wPzJP8.tar
PSCID is: DCC090
 CandID id: 587630
 visit_label is: V1
DBD::mysql::db do failed: Field 'RegistrationProjectID' doesn't have a default value at /opt/Loris-MRI/bin/mri/uploadNeuroDB/NeuroDB/MRI.pm line 1026.
ERROR: Failed to insert record in table mri_scanner:
The following database commands failed:
	PREPARE s FROM 'INSERT INTO mri_scanner (Manufacturer,Software,Serial_number,CandID,Model) VALUES (?,?,?,?,?)';
	SET @x1='SIEMENS',@x2='syngo MR B17',@x3='35014',@x4='601025',@x5='TrioTim';
	EXECUTE s USING @x1,@x2,@x3,@x4,@x5;
Error obtained:Cannot add or update a child row: a foreign key constraint fails (`db`.`mri_scanner`, CONSTRAINT `FK_mri_scanner_1` FOREIGN KEY (`CandID`) REFERENCES `candidate` (`CandID`)) (error code 1452)

 ERROR: The validation has failed. Either re-run the validation again and fix the problem. Or re-run tarchiveLoader.pl using -force to force the execution.

What did you expect to happen?

The script should not be blocked with a default_project in configuration.

@regisoc regisoc added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 25.0.0 - Bugs labels Apr 12, 2023
@regisoc regisoc mentioned this issue Apr 12, 2023
15 tasks
@laemtl
Copy link
Contributor

laemtl commented Apr 18, 2023

Fixed by aces/Loris-MRI#914

@laemtl laemtl closed this as completed Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

3 participants