psychoinformatics-de / datalad-hirni

DataLad extension for (semi-)automated, reproducible processing of (medical/neuro)imaging data
http://datalad.org
Other
5 stars 8 forks source link

`spec2bids()` misinterprets path #119

Open mih opened 5 years ago

mih commented 5 years ago

Demo:

(datalad3-dev) 2 mih@meiner /tmp % find bids -name studyspec.json
bids/sourcedata/acq1/studyspec.json
bids/sourcedata/acq2/studyspec.json
bids/sourcedata/studyspec.json
(datalad3-dev) mih@meiner /tmp % datalad hirni-spec2bids -d bids --anonymize $(find bids -name studyspec.json)
spec2bids(impossible): /tmp/bids/bids/sourcedata/acq1/studyspec.json [/tmp/bids/bids/sourcedata/acq1/studyspec.json not found]
[ERROR  ] [Errno 2] No such file or directory: '/tmp/bids/bids/sourcedata/acq1/studyspec.json' [json_py.py:load_stream:138] (FileNotFoundError) 

Also: double error, once as an impossible result, once as a file access error. The first is enough.