{"record":{"id":"123c7e178871bb12","repo":"XX-net/XX-Net","slug":"start-module-script-not-exist-s","errorCode":null,"errorMessage":"start module script not exist:%s","messagePattern":"start module script not exist:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"code/default/launcher/module_init.py","lineNumber":66,"sourceCode":"        if module not in proc_handler:\n            proc_handler[module] = {}\n\n        if os.path.isfile(os.path.join(root_path, module, \"__init__.py\")):\n            if \"imp\" not in proc_handler[module]:\n                proc_handler[module][\"imp\"] = __import__(module, globals(), locals(), ['local'], 0)\n\n            _local = proc_handler[module][\"imp\"].local\n            p = threading.Thread(target=_local.start, args=([xargs]), name=\"%s_start\" % module)\n            p.daemon = True\n            p.start()\n            proc_handler[module][\"proc\"] = p\n\n            while not _local.is_ready():\n                time.sleep(0.1)\n        else:\n            script_path = os.path.join(root_path, module, 'start.py')\n            if not os.path.isfile(script_path):\n                xlog.warn(\"start module script not exist:%s\", script_path)\n                return \"fail\"\n\n            proc_handler[module][\"proc\"] = subprocess.Popen([sys.executable, script_path], shell=False)\n\n        xlog.info(\"module %s started\", module)\n\n    except Exception as e:\n        xlog.exception(\"start module %s fail:%s\", module, e)\n        raise\n    return \"start success.\"\n\n\ndef stop(module):\n    try:\n        if module == \"all\":\n            modules = list(proc_handler)\n            for m in modules:\n                stop(m)","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/module_init.py#L48-L84","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the path printed in the log exists and re-download/reinstall the broken module so start.py is restored","Remove or fix the module entry in the auto-start configuration if the module is no longer used","Check that root_path in the launcher config points at the correct code/default directory","Re-run the updater to re-sync module files"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\nscript = os.path.join(root_path, module, 'start.py')\nif not os.path.isfile(script):\n    print('module %s incomplete; reinstall it' % module)\nelse:\n    start(module)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate module directories contain start.py before adding them to auto-start","Re-run the updater after interrupted downloads","Don't delete files inside module directories manually"],"tags":["module-start","missing-file","launcher"],"backgroundTag":"missing-startup-script","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}