ImportError: No module named 'bids'

Hello fmriprep experts,

‘bidskit’ is throwing an error when I tried to convert dicom to BIDS:

“bidskit /home/xxx/yyy/CSRI-130-1-SS/DICOM”

'Traceback (most recent call last):
File “/usr/local/bin/bidskit”, line 9, in
load_entry_point(‘bidskit==2019.8.16’, ‘console_scripts’, ‘bidskit’)()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2569, in load_entry_point
return ep.load()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2229, in load
return self.resolve()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2235, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/local/lib/python3.5/dist-packages/bidskit-2019.8.16-py3.5.egg/bidskit/main.py”, line 42, in
File “/usr/local/lib/python3.5/dist-packages/bidskit-2019.8.16-py3.5.egg/bidskit/translate.py”, line 36, in
ImportError: No module named ‘bids’ ’

Any help would help me.

regards
Korann

Looks like you don’t have pybids installed. How did you install bidskit?

I followed this below link to install bidskit.
https://github.com/jmtyszka/bidskit/blob/master/docs/Installation.md

Is it necessary to install pybids?

Also I tried to run the docker version of fmriprep:
docker run --rm -v $home/naren123/Desktop/TO_BIDS:/sub-01:ro -v $home/naren123/Desktop/TO_BIDS:/output -w /scratch poldracklab/fmriprep:latest /sub-01 /output/out participant -w /out/work/ --ignore fieldmaps

And the terminal output is here:

1: [ERR] Quick validation failed - the general folder structure does not resemble a BIDS dataset. Have you chosen the right folder (with “sub-*/” subfolders)? Check for structural/naming issues and presence of at least one subject. (code: 61 - QUICK_VALIDATION_FAILED)
.sub-01

Please visit https://neurostars.org/search?q=QUICK_VALIDATION_FAILED for existing conversations about this issue.

Making sure the input data is BIDS compliant (warnings can be ignored in most cases).

Traceback (most recent call last):
File “/usr/local/miniconda/bin/fmriprep”, line 10, in
sys.exit(main())
File “/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py”, line 349, in main
(for free) by registering at https://surfer.nmr.mgh.harvard.edu/registration.html""")
RuntimeError: ERROR: a valid license file is required for FreeSurfer to run. fMRIPrep looked for an existing license file at several paths, in this order: 1) command line argument --fs-license-file; 2) $FS_LICENSE environment variable; and 3) the $FREESURFER_HOME/license.txt path. Get it (for free) by registering at https://surfer.nmr.mgh.harvard.edu/registration.html
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

Please guide me to sort out this issue as well.

regards
Korann

It looks like bidskit has imported pybids since https://github.com/jmtyszka/bidskit/pull/57, but it’s not in their install_requires. You could open a pull request to add it here:

Then the bidskit installation will automatically install pybids in the process.