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

Fail to instantiate module "GradQC" with Slicer 4.11 #46

Open
hyosmos opened this issue Apr 26, 2021 · 5 comments
Open

Fail to instantiate module "GradQC" with Slicer 4.11 #46

hyosmos opened this issue Apr 26, 2021 · 5 comments

Comments

@hyosmos
Copy link

hyosmos commented Apr 26, 2021

After I install DiffusionQC extension, there comes an error whenever I start Slicer:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/amvoid/ProgramFiles/Slicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/amvoid/ProgramFiles/Slicer/NA-MIC/Extensions-29738/DiffusionQC/lib/Slicer-4.11/qt-scripted-modules/GradQC.py", line 5, in <module>
    from gradqclib.slicerUserInteraction import slicerGUI
  File "/home/amvoid/ProgramFiles/Slicer/NA-MIC/Extensions-29738/DiffusionQC/lib/Slicer-4.11/qt-scripted-modules/gradqclib/slicerUserInteraction.py", line 6, in <module>
    from diffusionqclib.dwi_attributes import dwi_attributes
  File "/home/amvoid/ProgramFiles/Slicer/NA-MIC/Extensions-29738/DiffusionQC/lib/python3.6/site-packages/diffusionqclib/dwi_attributes.py", line 4, in <module>
    from nhdr_write import nhdr_write
ModuleNotFoundError: No module named 'nhdr_write'
loadSourceAsModule - Failed to load file "/home/amvoid/ProgramFiles/Slicer/NA-MIC/Extensions-29738/DiffusionQC/lib/Slicer-4.11/qt-scripted-modules/GradQC.py"  as module "GradQC" !
Fail to instantiate module  "GradQC"
The following modules failed to be instantiated:
   GradQC
@tashrifbillah
Copy link
Collaborator

Hi, sorry about the error. I believe it is due to issue #42. Recently Slicer 4.11 has changed in a way that requires us to import functions in a different way which I haven't gotten the time to do yet.

In the meantime, can you get a Slicer-4.10, affect this fix, and thereby use GradQC?

@hyosmos hyosmos closed this as completed Apr 27, 2021
@hyosmos hyosmos reopened this Apr 27, 2021
@hyosmos
Copy link
Author

hyosmos commented Apr 27, 2021

I reinstalled Slicer-4.10 version, but didn't find DiffusionQC Extension at all...

image

That is weird.

@tashrifbillah
Copy link
Collaborator

Type DiffusionQC in the search bar, it should show up and let you click INSTALL.

@hyosmos
Copy link
Author

hyosmos commented Apr 27, 2021

Type DiffusionQC in the search bar, it should show up and let you click INSTALL.

Thank u.
I made it work in Ubuntu. (But still didn't work in windows. )
I tested it with sample dwi image in method i), and failed with another error:

Traceback (most recent call last):
  File "/home/amvoid/.config/NA-MIC/Extensions-27501/DiffusionQC/lib/Slicer-4.10/qt-scripted-modules/GradQC.py", line 358, in onApplyButton
    cliNode= slicer.cli.run(diffusionQCcli, parameters)
  File "/home/amvoid/ProgramFiles/Slicer/bin/Python/slicer/cli.py", line 82, in run
    logic.Apply(node, update_display)
TypeError: Apply argument 1: method requires a VTK object

@tashrifbillah
Copy link
Collaborator

Are you saying you did https://github.com/pnlbwh/SlicerDiffusionQC#tests (i) ?

In any case, can you try (ii) ?

Email [email protected] to obtain my office hour info so we can take a look at it together.

lassoan added a commit to lassoan/SlicerDiffusionQC that referenced this issue Mar 30, 2022
fixes issues mentioned at pnlbwh#46
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