raamana / visualqc

VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
https://raamana.github.io/visualqc/
Apache License 2.0
73 stars 13 forks source link

visualqc_func_mri errors with the latest version of pybids #39

Closed dokato closed 3 years ago

dokato commented 4 years ago

What I Did

I tried to run

visualqc_func_mri -b SmallData/

and got:

  File "/home/me/miniconda3/lib/python3.7/site-packages/visualqc/functional_mri.py", line 344, in init_getters
    from bids.layers import BIDSLayout
ModuleNotFoundError: No module named 'bids.grabbids'

I noticed that in the version 0.7.0 from Jan 2019 they changed this grabbids submodule to layout: https://github.com/bids-standard/pybids/blob/master/CHANGELOG.md#version-070-january-10-2019

Unfortunately, the fix wasn't as easy as replacing import in 344 of functional_mri.py:

from bids.layout import BIDSLayout

After doing that I got instead

 File "/home/me/miniconda3/lib/python3.7/site-packages/bids/layout/layout.py", line 969, in get
    raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'extensions' is not a recognized entity. Did you mean ['extension']? If you're sure you want to impose this constraint, set invalid_filters='allow'.

Maybe temporary fix would be to specify pybids version in requirements?

raamana commented 4 years ago

thanks @dokato for the report. Let me look in quickly and advise you shortly

raamana commented 4 years ago

could you uninstall and reinstall, and try the latest 0.4.7 version? Thanks.

dokato commented 4 years ago

Thanks for a quick reaction 👍 This solves the import problem.