XX-net/XX-Net · error

start module script not exist:%s

Error message

start module script not exist:%s

What it means

module_init.start reports that the per-module bootstrap script <root_path>/<module>/start.py does not exist, so the module cannot be launched as a subprocess. The function returns 'fail' instead of raising; the module simply never starts.

Source

Thrown at code/default/launcher/module_init.py:66

        if module not in proc_handler:
            proc_handler[module] = {}

        if os.path.isfile(os.path.join(root_path, module, "__init__.py")):
            if "imp" not in proc_handler[module]:
                proc_handler[module]["imp"] = __import__(module, globals(), locals(), ['local'], 0)

            _local = proc_handler[module]["imp"].local
            p = threading.Thread(target=_local.start, args=([xargs]), name="%s_start" % module)
            p.daemon = True
            p.start()
            proc_handler[module]["proc"] = p

            while not _local.is_ready():
                time.sleep(0.1)
        else:
            script_path = os.path.join(root_path, module, 'start.py')
            if not os.path.isfile(script_path):
                xlog.warn("start module script not exist:%s", script_path)
                return "fail"

            proc_handler[module]["proc"] = subprocess.Popen([sys.executable, script_path], shell=False)

        xlog.info("module %s started", module)

    except Exception as e:
        xlog.exception("start module %s fail:%s", module, e)
        raise
    return "start success."


def stop(module):
    try:
        if module == "all":
            modules = list(proc_handler)
            for m in modules:
                stop(m)

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Verify the path printed in the log exists and re-download/reinstall the broken module so start.py is restored
  2. Remove or fix the module entry in the auto-start configuration if the module is no longer used
  3. Check that root_path in the launcher config points at the correct code/default directory
  4. Re-run the updater to re-sync module files
Defensive patterns

Strategy: validation

Validate before calling

import os
script = os.path.join(root_path, module, 'start.py')
if not os.path.isfile(script):
    print('module %s incomplete; reinstall it' % module)
else:
    start(module)

Prevention

When it happens

Trigger: Calling start(module) or start_all_auto() for a module directory that exists (or is registered in proc_handler) but lacks a start.py file, e.g. an incomplete download/update of a module like gae_proxy or x_tunnel.

Common situations: A interrupted or partially applied module update left the module directory without start.py; module folder deleted manually while config still auto-starts it; wrong root_path configuration.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/123c7e178871bb12. Report an issue: GitHub.