Closed sina-mansour closed 2 years ago
Presumably it has worked for some number of exemplar subjects previously, but it has then somehow crashed out on this one?
It looks right, based on a copy&paste of ls
to text; but there could be nasty hidden or Unicode character loitering in there somewhere. You'll need to add some code in there before the exception is raised. Something like:
if not all(os.path.basename(vtk_file.split('-')[0]) == os.path.basename(vtk_filelist[0]).split('-')[0] for vtk_file in vtk_filelist[1:]):
app.var(vtk_filelist[0])
for vtk_file in vtk_filelist[1:]:
if os.path.basename(vtk_file.split('-')[0]) != os.path.basename(vtk_filelist[0]).split('-')[0]:
app.var(vtk_file)
raise MRtrixError('VTK files in FIRST directory "' + first_path + '" do not all possess same prefix')
Though I think I just spotted the mistake... I'll make a PR momentarily.
Thanks for this prompt fix Rob, this solved the issue.
Today, I was running the scripts for a single subject on Spartan and the following error stops the pipeline:
When using the 5ttgen script which uses the first output on spartan, the following error occurred:
I'm not sure why this happens, hence I shared this here. @Lestropie Do you know what's possibly going wrong?
Here are the contents of the T1_first directory for your reference:
I think it's this bit of code giving the error, but I'm not sure as to why it happens.