{"record":{"id":"d6d6a94091930028","repo":"nexu-io/open-design","slug":"ppt-master-python-must-be-python-3-10-or-newer","errorCode":null,"errorMessage":"--ppt-master-python must be Python 3.10 or newer: {requested}","messagePattern":"--ppt-master-python must be Python 3\\.10 or newer: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"plugins/community/humanize-ppt/scripts/humanize_ppt_v2.py","lineNumber":2654,"sourceCode":"            continue\n        checked.add(resolved)\n        try:\n            result = subprocess.run(\n                [\n                    resolved,\n                    \"-c\",\n                    \"import sys; print('.'.join(map(str, sys.version_info[:3]))); raise SystemExit(0 if sys.version_info >= (3, 10) else 1)\",\n                ],\n                text=True,\n                capture_output=True,\n            )\n        except OSError:\n            continue\n        if result.returncode == 0:\n            return resolved, result.stdout.strip()\n\n    if requested:\n        raise ValueError(f\"--ppt-master-python must be Python 3.10 or newer: {requested}\")\n    return \"python3\", \"unverified\"\n\n\ndef write_ppt_master_source(out, title, plan, source, language):\n    \"\"\"Write a self-contained semantic source for PPT Master's Strategist.\n\n    PPT Master still owns design_spec/spec_lock and every native rendering\n    decision. This file freezes Humanize's page story, notes intent, and media\n    requirements so the downstream Strategist does not restart from raw source.\n    \"\"\"\n    source_path = Path(source).expanduser().resolve()\n    lines = [\n        \"# Humanize PPT → PPT Master Source Contract\",\n        \"\",\n        f\"- Title: {title}\",\n        f\"- Language: {language}\",\n        f\"- Original source: `{source_path}`\",\n        f\"- Planned slides: {len(plan)}\",","sourceCodeStart":2636,"sourceCodeEnd":2672,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/plugins/community/humanize-ppt/scripts/humanize_ppt_v2.py#L2636-L2672","documentation":"Raised in humanize_ppt_v2.py when resolving `--ppt-master-python`. The resolver probes candidate Python interpreters by running a subprocess that prints its version and exits 0 only if `sys.version_info >= (3, 10)`. If the user explicitly requested an interpreter (the `requested` variable is set) and none of the probed candidates passed the version check, it raises ValueError. When no interpreter was explicitly requested, it silently falls back to ('python3', 'unverified').","triggerScenarios":"User passes `--ppt-master-python /usr/bin/python3.8` (or any 3.9-or-older interpreter); the candidate's version probe subprocess returns exit code 1; loop ends without a match; ValueError raised. Also fires if the requested path is valid but the version check subprocess errors out (returncode != 0) for every candidate.","commonSituations":"System default python3 is 3.8/3.9 (common on older Ubuntu/Debian LTS); user points at a conda/pyenv env built on an older Python; macOS where /usr/bin/python3 is older than the brew 3.x; CI matrix still pinned to 3.9.","solutions":["Point --ppt-master-python at a Python 3.10+ interpreter: install one (pyenv install 3.11, brew install python@3.12, apt install python3.11) and pass its absolute path.","Remove the --ppt-master-python flag to let the resolver auto-pick python3 (fallback path returns ('python3','unverified') instead of raising).","Verify the candidate version directly: `/path/to/python -c \"import sys; print(sys.version_info >= (3,10))\"` — must print True.","If using pyenv/conda, activate the environment first so `python3` resolves to 3.10+ before running humanize-ppt."],"exampleFix":"// before\npython3 humanize_ppt_v2.py --ppt-master-python /usr/bin/python3 --source x.md\n# -> ValueError: --ppt-master-python must be Python 3.10 or newer: /usr/bin/python3\n\n// after\npyenv install 3.11 && pyenv global 3.11  # or: brew install python@3.12\npython3 humanize_ppt_v2.py --ppt-master-python $(command -v python3) --source x.md","handlingStrategy":"validation","validationCode":"import subprocess, sys\n\ndef python_at_least(path: str, minimum=(3, 10)) -> bool:\n    try:\n        r = subprocess.run(\n            [path, \"-c\",\n             f\"import sys; raise SystemExit(0 if sys.version_info >= {minimum} else 1)\"],\n            capture_output=True,\n        )\n    except OSError:\n        return False\n    return r.returncode == 0\n\nif args.ppt_master_python and not python_at_least(args.ppt_master_python):\n    raise SystemExit(\n        f\"--ppt-master-python must be Python 3.10+: {args.ppt_master_python}\"\n    )","typeGuard":null,"tryCatchPattern":"try:\n    resolved, version = resolve_ppt_master_python(args.ppt_master_python)\nexcept ValueError as exc:\n    raise SystemExit(str(exc)) from exc","preventionTips":["Standardize on Python 3.10+ across the project (set requires-python in pyproject).","In CI matrices, drop 3.8/3.9 jobs or upgrade them.","Let the resolver auto-pick by omitting --ppt-master-python when your default python3 is 3.10+.","Document the minimum version prominently in the humanize-ppt README."],"tags":["python","version-check","subprocess","config","humanize-ppt"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}