Closed denisri closed 1 year ago
Actually sys.path
does not seem to be modified, but processes are loaded as modules in the global namespace, thus any process which has the same name as a regular module can cause problem. We can investigate if we can load processes as modules inside another namespace, as proposed above.
Seems to be fixed.
In Brainvisa (axon) the toolboxes processes path is added to the python modules search paths. If a toolbox process has the same name as a regular python module or package, this can lead to confusions and problems. Like, for instance, morphologist: it is both a process (a pipeline actually), and a package. I am actually surprised problems did not show up before now, but while porting to Capsul v3, I get errors because some code try to import the
morphologist
package sub-modules, and it fails because the pipeline module is already loaded insys.modules["morphologist"]
. Would it be possible to prefix all processes imports in a virtual package ("axon_process.morphomogist
" for instance) ?