Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run GUI due to docker related error #11

Closed
aweinstein opened this issue Aug 25, 2021 · 4 comments
Closed

Can't run GUI due to docker related error #11

aweinstein opened this issue Aug 25, 2021 · 4 comments

Comments

@aweinstein
Copy link

I just installed rsHRF in a Linux machine with an Anaconda installation, using pip install rsHRF.

rsHRF was installed without a problem. However, if I run rsHRF --GUI, I get the error rsHRF: error: --GUI should not be used inside a Docker container, although, as far as I know, I'm not running rsHRF inside a Docker container.

@aweinstein
Copy link
Author

Just for debugging, commented the try block where this message is raised, and I get this error:

Traceback (most recent call last):
  File "/home/ajw/.local/anaconda/bin/rsHRF", line 8, in <module>
    sys.exit(main())
  File "/home/ajw/.local/anaconda/lib/python3.9/site-packages/rsHRF/CLI.py", line 442, in main
    run_rsHRF()
  File "/home/ajw/.local/anaconda/lib/python3.9/site-packages/rsHRF/CLI.py", line 152, in run_rsHRF
    from .rsHRF_GUI import run
  File "/home/ajw/.local/anaconda/lib/python3.9/site-packages/rsHRF/rsHRF_GUI/__init__.py", line 1, in <module>
    from . import core 
  File "/home/ajw/.local/anaconda/lib/python3.9/site-packages/rsHRF/rsHRF_GUI/core/__init__.py", line 1, in <module>
    from .core import Core
  File "/home/ajw/.local/anaconda/lib/python3.9/site-packages/rsHRF/rsHRF_GUI/core/core.py", line 5, in <module>
    from bids.grabbids  import BIDSLayout
ModuleNotFoundError: No module named 'bids.grabbids'

So it is not related to docker, but to the lack of this module. I'll investigate further.

@aweinstein
Copy link
Author

aweinstein commented Aug 25, 2021

It seems the problem is that bids.grabbids was renamed. According to https://bids-standard.github.io/pybids/whats_new.html, in version 0.7.0:

"The grabbids module has been renamed to layout and BIDSLayout.py and BIDSvalidator.py are now layout.py and validation.py, respectively."

Changing
from bids.grabbids import BIDSLayout

by

from bids.layout import BIDSLayout

in rsHRF_GUI/core/core.py seems to fix the problem.

@NigelCol
Copy link
Collaborator

Hey @aweinstein, thank you very much for letting us know about this issue.

It indeed was a problem with the BIDSlayout, as we're using a newer version of Pybids in the latest update of the toolbox. However, we forgot to implement this change into the GUI scripts. The GUI should now start up.

Take note that for the BIDS version of the GUI, you will need to select the folder where your subjects folders are stored. For example : path/derivatives/fmriprep.

Furthermore, the BIDS-data requires at minimum the following entities
:

    'datatype': 'func',
    'task' : 'rest',
    'desc': 'preproc',
    'suffix': 'bold',
    'extension': 'nii' or 'nii.gz'

P.S : As an alternative you could use the GUI of matlab (as it offers more options than the python version at the moment), or the commandline version in python using the docker/GUI, as the current rsHRF build of those has passed unit tests through the CircleCi.

@aweinstein
Copy link
Author

Thank you @NigelCol for looking into this.

Actually, I am not planning to use the GUI. I just wanted to check that the library was working, and I thought that running the GUI would be the easiest way to do that. So it seems that my cumbersome approach was useful to find this bug :) .

Thank you for sharing this project with the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants