UNFmontreal / Dcm2Bids

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure
https://UNFmontreal.github.io/Dcm2Bids/
GNU General Public License v3.0
152 stars 81 forks source link

bids validator not working properly #300

Open MRIDude opened 3 weeks ago

MRIDude commented 3 weeks ago

I have been trying to use the bids_validate flag for dcm2bids. dcm2bids exit with message.

The bids-validator does not seem to work properly. The bids-validator may not be installed on your computer. Please check: https://github.com/bids-standard/bids-validator.

I have dcm2bids installed using conda. bids-validate installed using both pip and conda in the same conda environment as dcm2bids. I have gone as far as reinstalling dcm2bids and bids-validator but nothing has changed. This is the command I am using dcm2bids -d ../sourcedata/PIBsourcedata/PIB006/VYr5mri -p PIB006 -s VYr5mri -c code/PIBdcm2bids.json --auto_extract_entities --force_dcm2bids --bids_validate The command works as intended with out the --bids_validate. Have I done some thing wrong?

arnaudbore commented 3 weeks ago

Hi @MRIDude ,

This error appears if bids-validator is not accessible.

Can you run this command: which bids-validator ? If it's able to find the binary it will output you the path to bids-validator.

If it works can you send me the commands you used to create your environnement and install dcm2bids and bids-validator so I can replicate the issue ?

If it doesn't show you the path it means there were an issue with the bids-validator installation.

Thank you in advance.

MRIDude commented 3 weeks ago

Here is the list of installed packages on conda bidscondaenv.txt

Though I have bids validator installed via conda. I realized to get it to show up on the command line I had to install it through npm which resulted with the same error. npm install -g bids-validator

arnaudbore commented 3 weeks ago

Are you able to run the bids-validator command line ?

MRIDude commented 3 weeks ago

Yes. It points to a binary in conda environment.

arnaudbore commented 3 weeks ago

Can you add in your .bashrc the PATH to the bids-validator binary ? It should look like this: export PATH=/absolute/path/to/your/bids-validator/folder:$PATH

I think it should help dcm2bids to find it.

MRIDude commented 3 weeks ago

It is already in the path. In the fact, it is the very first folder in the path. However, I added it anyway, I got the same error.

arnaudbore commented 3 weeks ago

I found the issue, I should have a new release by the end of next week. Thanks for reporting.