-
Notifications
You must be signed in to change notification settings - Fork 533
FIX: BET raising "No image files match: ..." with very long file names #3309
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
Conversation
…nd applied black formatting.
Codecov Report
@@ Coverage Diff @@
## master #3309 +/- ##
=======================================
Coverage 64.70% 64.70%
=======================================
Files 302 302
Lines 39869 39875 +6
Branches 5288 5289 +1
=======================================
+ Hits 25796 25801 +5
- Misses 12984 12985 +1
Partials 1089 1089
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I changed |
Just for context: I encountered this issue trying to run MRIQC. It seems even running BET manually with the MRIQC workflow's relative |
@ZviBaratz - thank you for taking a stab at this. could you please tell me what the BET command (the cmdline that get's executed) looks like before it crashes? |
@satra This is the command generated by MRIQC when using nipype on this PR's branch:
For readability's sake: in_file = "/home/flavus/Projects/mriqc/work/mriqc_wf/anatMRIQC/HeadMaskWorkflow/_in_file_..media..veracrypt1..media..MRI..NIfTI..sub-772..ses-201905310935..anat..sub-772_acq-54363corrected_T1w.nii.gz/fsl_bet/sub-772_acq-54363corrected_T1w_conformed_corrected.nii.gz"
out_file = "sub-772_acq-54363corrected_T1w_conformed_corrected_brain.nii.gz" Unfortunately, unlike @oesteban case, even trying to run the generated command manually raises the same exception. |
@ZviBaratz - the command line doesn't quite look right. the issue is that it's still reflecting the relative path. in this particular case you would do the same thing for in_file that you have done for out_file but by overriding the function format_arg here is an example from FAST, which you can adapt for BET nipype/nipype/interfaces/fsl/preprocess.py Line 381 in e66bc41
if you do this for in_file, it should reduce the path length. |
@satra Thank you for clarifying this. I implemented what you suggested, and I am happy to report it indeed solves the issue (at least in my use case). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible. Need to get CI back up and running, but I don't think we need to hold this up.
Trying to fix #3211.
@satra or @oesteban, I'll try a couple of things and see if it works, but I'm not confident if I completely understood:
If you could help clarify how exactly this would be best implemented, I would be happy to update the PR and hopefully resolve this issue.