INFO: Running heudiconv version 0.6.0.dev1
Traceback (most recent call last):
File “/opt/miniconda-latest/bin/heudiconv”, line 11, in
load_entry_point(‘heudiconv’, ‘console_scripts’, ‘heudiconv’)()
File “/src/heudiconv/heudiconv/cli/run.py”, line 127, in main
process_args(args)
File “/src/heudiconv/heudiconv/cli/run.py”, line 256, in process_args
heuristic = load_heuristic(args.heuristic)
File “/src/heudiconv/heudiconv/utils.py”, line 308, in load_heuristic
mod = import(fname.split(’.’)[0])
ModuleNotFoundError: No module named ‘heuristic’
I am sure I have done something moronic but am not sure what exactly.
If anyone has encountered a similar problem and solved it - or haven’t but have some advice - would love to hear from you.
It’s been a little while since I’ve used heudiconv, but looking at the named arguments of the documentation, I see -f should point to a single heuristic file if I’m not mistaken. If I’m right, then the {subject} placeholder in /base/Nifti/code/{subject}/heuristic.py should be removed and replaced with an actual path to a heuristic file. Ideally the heuristic file can handle the heterogeneity of the scans the file may run into.
Does each subject have their own heuristic file that you would like to run independently?
I made 3 mistakes. First my ‘base’ pathway was not going to the correct place and then second, you were correct, the code did not work when I put the ‘heuristic.py’ file in a subject-specific folder. Third - I needed to get enough sleep to be wakeful enough to see the first problem.
In the process I also watched your video
Which was a superuseful resource. Thank you again.
Hello, I have met the same problem showing that “ModuleNotFoundError: No module named ‘heuristic’”. Here is my command “sudo docker run --rm -it -v /data/fy:/base nipy/heudiconv:latest -d /base/FTAD_CN/{subject}//.dcm -o /base/FTAD_CN_Heud/ -l /data/fy --heuristic /data/fy/network/heuristic.py -s 1_S_0071 -c dcm2niix -b --overwrite”
For the heuristic.py, I have revsied it according to the tutorial Heudiconv Example - YouTube