Open tlechien opened 3 years ago
Hi, weird issue... can you provide me more details ? How are you running Mirage ? sudo ./mirage_launcher ? sudo mirage ? Are you trying to run a module directly from an external python script ? Can you provide me a code snippet allowing to reproduce the issue ? Thanks.
Hello, I admit I could have been clearer. I'm importing Mirage as a library. Tried both to call loadModule as a standalone function and in a new module. It seems there is sth going on with the loader and the paths ( generated in modules/init.py & libs/utils.py). I modified init in mirage/core/loader.py with
self.modulesList = {}
modulesPath = next(iter(modules.__path__))
mList = modules.generateModulesDictionary(modulesPath, modulesPath)
for moduleName,module in mList.items():
current = module#__import__("modules."+module, fromlist=module)
moduleClass = getattr(current,moduleName)
self.modulesList[moduleName] = moduleClass
to fix it (and it works as long as i initialize app.App() beforehand) but it's more of a bandaid than an actual fix.
Cordially,
tlechien
Hello,
Great repo,
I encounter an issue when trying to load a module:
Following the breadcrumbs I found out that there is an issue in the loader:
Cordially,
tlechien