{"record":{"id":"15649dd676e1ab7c","repo":"mvanhorn/last30days-skill","slug":"last30days-v3-requires-python-req-ndetected-py","errorCode":null,"errorMessage":"last30days v3 requires Python {req}+.\\nDetected Python {major}.{minor}.{micro}.\\nInstall with:\\n  Mac:     brew install python@{req}\\n  Windows: winget install Python.Python.{req}\\n  Linux:   sudo apt install python{req}  (or pyenv install {req})\\nThen rerun: python{req} <path-to-script> setup\\n","messagePattern":"last30days v3 requires Python (.+?)\\+\\.\\\\nDetected Python (.+?)\\.(.+?)\\.(.+?)\\.\\\\nInstall with:\\\\n  Mac:     brew install python@(.+?)\\\\n  Windows: winget install Python\\.Python\\.(.+?)\\\\n  Linux:   sudo apt install python(.+?)  \\(or pyenv install (.+?)\\)\\\\nThen rerun: python(.+?) <path-to-script> setup\\\\n","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"critical","filePath":"skills/last30days/scripts/last30days.py","lineNumber":41,"sourceCode":"\n\ndef ensure_supported_python(version_info: tuple[int, int, int] | object | None = None) -> None:\n    if version_info is None:\n        version_info = sys.version_info\n    major, minor, micro = tuple(version_info[:3])\n    if (major, minor) >= MIN_PYTHON:\n        return\n    req = f\"{MIN_PYTHON[0]}.{MIN_PYTHON[1]}\"\n    sys.stderr.write(\n        f\"last30days v3 requires Python {req}+.\\n\"\n        f\"Detected Python {major}.{minor}.{micro}.\\n\"\n        f\"Install with:\\n\"\n        f\"  Mac:     brew install python@{req}\\n\"\n        f\"  Windows: winget install Python.Python.{req}\\n\"\n        f\"  Linux:   sudo apt install python{req}  (or pyenv install {req})\\n\"\n        f\"Then rerun: python{req} <path-to-script> setup\\n\"\n    )\n    raise SystemExit(1)\n\n\nensure_supported_python()\n\nif os.name == \"nt\":\n    for stream in (sys.stdout, sys.stderr):\n        if hasattr(stream, \"reconfigure\"):\n            stream.reconfigure(encoding=\"utf-8\", errors=\"replace\")\n\nSCRIPT_DIR = Path(__file__).parent.resolve()\nsys.path.insert(0, str(SCRIPT_DIR))\n\nfrom lib import competitors as competitors_mod, corpus, dates, discovery_handoff, env, freshness, html_render, http, permission_preflight, pipeline, registers, render, schema, ui\n\n_child_pids: set[int] = set()\n_child_pids_lock = threading.Lock()\n\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/skills/last30days/scripts/last30days.py#L23-L59","documentation":"A hard Python-version gate executed at import time in last30days.py: if the running interpreter's (major, minor) is below MIN_PYTHON (3.12 per the repo docs), it prints a platform-specific install recipe to stderr and raises SystemExit(1). No code in the skill runs at all on older interpreters.","triggerScenarios":"Invoking scripts/last30days.py with python3.11 or older: 'python3 scripts/last30days.py ...' on a system whose default python3 predates 3.12, or a venv created from an old interpreter. ensure_supported_python() runs before anything else, so the very first command fails.","commonSituations":"macOS system python (3.9); Ubuntu 20.04/22.04 default python3; a cron/CI image pinned to an older Python; harness shims invoking 'python' instead of 'python3.12'.","solutions":["Re-run with an explicit 3.12+ interpreter: python3.12 scripts/last30days.py setup (exact command is printed in the message).","Install per the printed platform recipe: brew install python@3.12 / winget install Python.Python.3.12 / apt or pyenv install 3.12.","Recreate the project venv from the new interpreter (uv venv --python 3.12) so subsequent runs inherit it.","In cron/systemd/agent configs, hardcode the 3.12+ binary path instead of bare 'python3'."],"exampleFix":"# before\npython3 scripts/last30days.py \"topic\"\n\n# after\npython3.12 scripts/last30days.py \"topic\"","handlingStrategy":"validation","validationCode":"import sys\nif sys.version_info < (3, 12):\n    sys.exit('this tool requires Python 3.12+; invoke with python3.12')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Invoke the skill with an explicit python3.12+ binary in cron, systemd, and agent configs.","Create venvs from a 3.12+ interpreter (uv venv --python 3.12)."],"tags":["python","version","runtime","startup"],"backgroundTag":null,"analyzedSha":"c7460f6114449ddfe6ea3fc2f23c3d910c0e740c","analyzedAt":"2026-08-15T03:34:49.540Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}