Heudiconv ModuleNotFoundError: No module named 'heuristic'

Hello,

The following command works when I run it as root however it gives me the “ModuleNotFoundError: No module named ‘heuristic’” error when I run it as a non-root user.

docker run -u $(id -u) --rm -it -v /data2/ViCTOR:/base nipy/heudiconv:latest -d /base/raw_data/sub-{subject}/ses-{session}//.IMA -o /base/heudiconv/Nifti -f /base/heudiconv/code/heuristic.py -s 509 -ss 1 -c dcm2niix -b --overwrite --minmeta

This is the error I get:

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’ve read through the following posts but I am still unable to get it to work as a non-root user:

When tested, the docker container does contain the appropriate directories and have the correct permissions for the user. Any help is appreciated, thank you in advance.

MANAGED BY INCF