{"record":{"id":"a0951db23e15f2d8","repo":"XX-net/XX-Net","slug":"update-s-fail-setup-script-s-not-exist","errorCode":null,"errorMessage":"update %s fail. setup script %s not exist","messagePattern":"update (.+?) fail\\. setup script (.+?) not exist","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"code/default/launcher/update.py","lineNumber":138,"sourceCode":"        return False\n\n\ndef install_module(module, new_version):\n    import module_init\n    import os, subprocess, sys\n\n    current_path = os.path.dirname(os.path.abspath(__file__))\n    new_module_version_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, module, new_version))\n\n    # check path exist\n    if not os.path.isdir(new_module_version_path):\n        xlog.error(\"install module %s dir %s not exist\", module, new_module_version_path)\n        return\n\n    # call setup.py\n    setup_script = os.path.join(new_module_version_path, \"setup.py\")\n    if not os.path.isfile(setup_script):\n        xlog.warn(\"update %s fail. setup script %s not exist\", module, setup_script)\n        return\n\n    config.current_version = str(new_version)\n    config.save()\n\n    if module == \"launcher\":\n        module_init.stop_all()\n        import web_control\n        web_control.stop()\n\n        subprocess.Popen([sys.executable, setup_script], shell=False)\n\n        os._exit(0)\n\n    else:\n        xlog.info(\"Setup %s version %s ...\", module, new_version)\n        try:\n            module_init.stop(module)","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/update.py#L120-L156","documentation":"update.install_module verified the downloaded module version directory exists but found no setup.py inside it, so the update for that module is aborted (function returns without installing). The version in config may have been checked already, but installation is skipped.","triggerScenarios":"install_module(module, new_version) after a download where new_module_version_path exists but lacks setup.py — e.g. a corrupted, half-extracted, or malformed module archive that passed directory checks.","commonSituations":"Truncated download or interrupted unzip left an incomplete module directory; upstream release package missing setup.py; disk full during extraction.","solutions":["Delete the partially extracted module version directory and re-trigger the update/download","Verify the module archive (sha1 was checked earlier) and re-extract it fully","Check disk space and permissions on the modules directory","If upstream package is genuinely missing setup.py, report/fetch a fixed release version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\nsetup = os.path.join(new_module_version_path, 'setup.py')\nif not os.path.isfile(setup):\n    raise RuntimeError('incomplete module package: %s' % setup)\ninstall_module(module, new_version)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-extract module archives atomically (temp dir then rename)","Verify archive integrity (sha1 + presence of setup.py) before switching versions","Keep free disk space during updates"],"tags":["update","module-install","missing-file"],"backgroundTag":"module-update-install-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}