populse / capsul

Collaborative Analysis Platform : Simple, Unifying, Lean
Other
7 stars 14 forks source link

Capsul 3.0 depends on sulci-nonfree indirectly, so is broken in the opensource distro #327

Closed ylep closed 7 months ago

ylep commented 7 months ago

The Axon bindings for Capsul 3.0 depend on morpho-deepsulci for the declaration of Morphologist schemas, which in turns depends on sigraph (sulci-nonfree). Therefore, Axon bindings of Capsul are broken in the opensource distro, even for binding processes that have nothing to do with Morphologist (e.g. https://github.com/neurospin/highres-cortex/pull/15).

Traceback (most recent call last):
  File "/casa/host/build/python/brainvisa/processing/qt4gui/neuroProcessesGUI.py", line 3643, in showProcess
    process = brainvisa.processes.getProcessInstance(process_id)
  File "/casa/host/build/python/brainvisa/processes.py", line 4751, in getProcessInstance
    result = result()
  File "/casa/host/build/python/brainvisa/processing/capsul_process.py", line 427, in __init__
    self.setup_capsul_process()
  File "/casa/host/build/python/brainvisa/processing/capsul_process.py", line 462, in setup_capsul_process
    capsul = self.get_capsul()
  File "/casa/host/build/python/brainvisa/processing/capsul_process.py", line 767, in get_capsul
    capsul = self.init_capsul(context)
  File "/casa/host/build/python/brainvisa/processing/capsul_process.py", line 694, in init_capsul
    declare_morpho_schemas('morphologist.capsul')
  File "/casa/host/src/capsul/master/capsul/schemas/brainvisa.py", line 225, in declare_morpho_schemas
    sulcideeplabeling = importlib.import_module(cnn_module)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/casa/host/build/python/deepsulci/sulci_labeling/capsul/labeling.py", line 7, in <module>
    from ...deeptools.dataset import extract_data
  File "/casa/host/build/python/deepsulci/deeptools/dataset.py", line 10, in <module>
    import sigraph
ModuleNotFoundError: No module named 'sigraph'
denisri commented 7 months ago

H have pushed a workaround (using a try...) but you're right on the problem. The brainvisa schema location is not clear yet, it may move away from Capsul in the future, but at the moment it is used for FakeMorphologist tests in Capsul so I have set this file here.

denisri commented 7 months ago

I have opened a separate ticket #328 for the remaining problem.

ylep commented 7 months ago

That particular issue is fixed for me, thanks! (but I confirm that I am still affected by #328)