Sudden error with dwi2response

Hi

I’m running into a strange error with dwi2response. Note I have attempted to use the config file ScriptScratchDir option and ‘tempfiledir’ option to see if this will help. It was running fine and suddenly I have this error:

dwi2response dhollander PC04.mif -mask mask.mif wm.txt gm.txt csf.txt

dwi2response:

dwi2response: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.
dwi2response:
dwi2response: Generated scratch directory: /Users/home/Documents/mrtrix_temp_file/dwi2response-tmp-PTN849/
dwi2response: Importing DWI data (/Users/home/Desktop/Mrtrix_sample/PC04.mif)…
dwi2response: Importing mask (/Users/home/Desktop/Mrtrix_sample/mask.mif)…
dwi2response: Changing to scratch directory (/Users/home/Documents/mrtrix_temp_file/dwi2response-tmp-PTN849/)
dwi2response: [ERROR] Unhandled Python exception:
dwi2response: [ERROR] AssertionError:
dwi2response: [ERROR] Traceback:
dwi2response: [ERROR] /Users/home/mrtrix3/bin/dwi2response:114 (in execute())
dwi2response: [ERROR] if not image.statistics(‘mask.mif’, mask=‘mask.mif’).count:
dwi2response: [ERROR] /Users/home/mrtrix3/lib/mrtrix3/image.py:251 (in statistics())
dwi2response: [ERROR] assert len(line) == len(IMAGE_STATISTICS)

When I run it with -debug it runs fine until the mrstats portion.

dwi2response: Command: ‘/Users/home/mrtrix3/bin/mrstats mask.mif -output mean -output median -output std -output std_rv -output min -output max -output count -mask mask.mif’ (piping data to local storage)
dwi2response: [ERROR] Unhandled Python exception:
dwi2response: [ERROR] AssertionError:
dwi2response: [ERROR] Traceback:
dwi2response: [ERROR] /Users/home/mrtrix3/bin/dwi2response:114 (in execute())
dwi2response: [ERROR] if not image.statistics(‘mask.mif’, mask=‘mask.mif’).count:
dwi2response: [ERROR] /Users/home/mrtrix3/lib/mrtrix3/image.py:251 (in statistics())
dwi2response: [ERROR] assert len(line) == len(IMAGE_STATISTICS)

I’m a little lost as this error suddenly appeared with no changes. I noticed another post on it that the user said resolved itself. Any input would be greatly appreciated.

Thank You
Patrick

This sounds like it might be similar to this issue, which we’ve just pushed a fix for. Assuming you have a source install (not one of the pre-compiled packages), you can update now and see if that resolves the problem, using these instructions:

cd mrtrix3    # or wherever you have installed MRtrix3
git pull
./build

Otherwise, you may need to wait until we push out the next micro release – it’ll be 3.0.2, but I’m not sure what the timelines will be for that one given that we’ve only just pushed out 3.0.1

Hey

Thanks for the response, I ended up just doing a full reinstall of both python and Mrtrix (and a few other things out of frustration). The problem no longer shows up and everything appears to run correctly so hopefully all is well.

Thanks a lot for the reply!

Patrick