<div dir="ltr">Hi Alfredo and Cecile,<div><br></div><div>Sorry for the erroneous information provided, I just checked, the program execution order seems to be correct, the order should be first to delete from image_upload, then tarchive table record. You need to check data to see what happened, possibly the first deletion was not successful in image_upload then the second deletion attempt broke out.</div><div><br></div><div>Ling Ma</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 6:14 PM Ling Ma <<a href="mailto:lingyun.ma@mcin.ca">lingyun.ma@mcin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><b>tarchive</b>, not archive, the email automatically corrected my writing.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 6:09 PM Ling Ma <<a href="mailto:lingyun.ma@mcin.ca" target="_blank">lingyun.ma@mcin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Alfredo and Cecile</div><div><br></div>The third question comes most likely from the fact the <a href="http://delete_imaging_upload.pl" target="_blank">delete_imaging_upload.pl</a> tries to delete from image_upload table, which references some record in the archive table. You need to check the related record in your DB to see what that record was referring to, then delete the record from archive if you are sure what you are doing. Possibly this is a bug of the <a href="http://delete_imaging_upload.pl" target="_blank">delete_imaging_upload.pl</a>, also possibly this bug has been fixed in the more recent version. Cecile knows more about that.<div><br></div><div>Best regards,</div><div>Ling Ma</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 6, 2020 at 6:02 PM Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank">cecile.madjar@mcin.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Alfredo,<div><br></div><div>See answers below in blue.<br></div></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Error type 1:<br>
===<br>
Error! File /ABC/data/pic/979907/IPMSA_979907_m00_NA_001_182_check.jpg exists in the database but was not found on the file system.<br>
Aborting.<br>
===<br>
<br>
Error type 2:<br>
===<br>
Error! File /ABC/data/assembly/677803/m12/mri/native/IPMSA_677803_m12_NA_002.nii exists in the database but was not found on the file system.<br>
Aborting.<br>
===<br></blockquote><div><br></div><div><font color="#0000ff">The first two errors are the same. The delete script always checks first if the file is on the filesystem. My guess is that when you ran the pipeline, the path to the NIfTI file was inserted into the database even when the NIfTI file was not created due to some mnc2nii conversion errors (known bug that was fixed in release 22.0). You can use the option -ignore to ignore the check between database and file system.</font></div><div><font color="#0000ff"> </font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Error type 3:<br>
===<br>
/ABC/data/pic/819059/IPMSA_819059_m12_NA_006_3098_check.jpg<br>
/ABC/data/pic/819059/IPMSA_819059_m12_NA_007_3099_check.jpg<br>
/ABC/data/pic/819059/IPMSA_819059_m12_NA_008_3100_check.jpg<br>
/ABCdata/pic/819059/IPMSA_819059_m12_NA_009_3101_check.jpg<br>
/ABC/data/pic/819059/IPMSA_819059_m12_t1_001_3091_check.jpg<br>
/ABC/data/pic/819059/IPMSA_819059_m12_t1_002_3092_check.jpg<br>
/ABC/data/tarchive/2009/DCM_2009-12-10_ImagingUpload-7-57-r0hk9h.tar<br>
<br>
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`IPMSA_LORIS`.`mri_upload`, CONSTRAINT `FK_mriupload_TarchiveID` FOREIGN KEY (`TarchiveID`) REFERENCES `tarchive` (`TarchiveID`)) at /data_/ipmsa/loris_data/IPMSA/bin/mri/tools//<a href="http://delete_imaging_upload.pl" rel="noreferrer" target="_blank">delete_imaging_upload.pl</a> line 1612.<br>
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle database=IPMSA_LORIS;host=132.216.133.50;port=3306; at /data_/ipmsa/loris_data/IPMSA/bin/mri/tools//<a href="http://delete_imaging_upload.pl" rel="noreferrer" target="_blank">delete_imaging_upload.pl</a> line 1612.<br>
===<br></blockquote><div><br></div><div><font color="#0000ff">Not sure what is going on here. Could you point me to the file so I can check where the issue comes from? Or the release version you are using. Are there any processed output data for that upload ID?</font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Error type 4:<br>
===<br>
Cannot delete upload 1543: the MRI pipeline is currently processing it.<br>
===<br></blockquote><div><br></div><div><font color="#0000ff">If you are sure you are not running the pipeline, you will need to update the mri_upload table to reflect this. For some obscure reason, the insertion status fields of the mri_upload table were not updated for that UploadID. Maybe the pipeline got interrupted?</font></div><div><font color="#0000ff">UPDATE mri_upload SET Inserting=0, InsertionComplete=1 WHERE UploadID=1543;</font></div><div><font color="#0000ff">Then, rerun the delete script on that UploadID.</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">Hope this helps. Best,</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">Cécile</font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Looking forward to hearing from you.<br>
<br>
Regards,<br>
Alfredo.<br>
<br>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div></div>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>