ValueError Traceback (most recent call last)
File C:\Anaconda\envs\ConcSpace\lib\site-packages\nipype\utils\spm_docs.py:49, in
---> 49 index = doc.index(hdr)
50 except ValueError as e:
ValueError: substring not found
The above exception was the direct cause of the following exception:
thank you very much for your question and welcome to Neurostars, it’s great to have you here.
Given you’re using windows10 and the path you indicated above it seems that this might be the problem. The path looks very “unix”-y with / whereas one needs to use \ on windows OS (IIRC). Did you try to specify the paths in a “windows” way with \ (and maybe using absolute paths)? On a related note: are you using WSL by any chance?
Hi @PeerHerholz ,
thanks for your reply. True, the depicted paths used / but changing it to \ did not resolve the issue.
I’m also using absolute paths to indicate the locations of spm and MCR, like so:
The notebook i’m using here is running in an environment on drive (F:) which is different from spm / mcr locations (C:). Could this cause the issue?
Concerning WSL: it’s installed but i’m not aware of actively using it here… not sure whether this is what you meant.
thx for the update, sorry it didn’t solve the issue.
Hm, windows OS is not my forte by far, sorry. Could you check if the location of the MCR ("C:\...) is accessible from your notebook (e.g. via os.listdir or so)? Maybe there’s something funky going on… . Re WSL: all good, if you’re not actively using it atm and not planning to do so in the future, we should focus on finding a solution based on your current environment.
from my env i can os.chdir() or os.listdir(path) into both the directories of the spm12 standalone (where run_spm12.sh is) and the MCR.
When i run spm.SPMCommand().version
a matlab command window with the following output opens briefly:
I think it may indicate that it uses opens the installed version of Matlab (2020b) instead of the MCR, right? This also has SPM12 as a regular toolbox listed, not the standalone SPM12 version.
Hope it helps narrow it down. Glad for you help.