Closed mohierf closed 9 years ago
Source of the WARNING log is in Shinken modulesmanager.py, function _try_bestload.
This function is called twice :
.module
as module name and module name as package
def try_best_load(cls, name, package=None):
try:
mod = importlib.import_module(name, package)
except Exception as err:
logger.warning("Cannot import %s : %s",
'%s.%s' % (package, name) if package else name,
err)
return
Don't assign this to me. For me, all this module management is pure magic :D
Stupid question: did you find a documentation somewhere that explain how to make a "new style" module ?
You are right ... I assigned this issue to you if you had an idea about it. But, no, I did not found any info about what are old style, new-old style, old-new style ... modules :-)
Issue appears to be due to the submodules python module not being found in the python path, as such it falls back to an older import mechanism that adds the shinken modules path (too many different definitions of module) to sys.path allowing it to resolve submodules.metamodule. I suspect that the issue is easiest resolved by simply changing the sub modules to use relative imports to pull the parent class into the module
The new submodules in the WebUI make the broker log a Warning:
Note: this log is a simple alert on WebUI module importation by the broker ... at the end, the WebUI is started and runs correctly!