{"record":{"id":"6fb96ee741148090","repo":"calesthio/OpenMontage","slug":"unknown-demo-args-demo-available-demos-avai","errorCode":null,"errorMessage":"Unknown demo '{args.demo}'. Available demos: {available}","messagePattern":"Unknown demo '(.+?)'\\. Available demos: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"render_demo.py","lineNumber":132,"sourceCode":"    )\n    parser.add_argument(\"demo\", nargs=\"?\", help=\"Render one named demo instead of all demos.\")\n    parser.add_argument(\"--list\", action=\"store_true\", help=\"List available demo fixtures and exit.\")\n    args = parser.parse_args(argv)\n\n    demos = discover_demos()\n    if not demos:\n        raise SystemExit(f\"Error: No demo prop files were found in {PROPS_DIR}.\")\n\n    if args.list:\n        print(\"Available zero-key demos:\")\n        for name in demos:\n            description = DEMO_DESCRIPTIONS.get(name, \"Checked-in Remotion demo\")\n            print(f\"  {name:20} {description}\")\n        return 0\n\n    if args.demo and args.demo not in demos:\n        available = \", \".join(demos)\n        raise SystemExit(f\"Unknown demo '{args.demo}'. Available demos: {available}\")\n\n    npx_cmd = ensure_demo_environment()\n    selected = {args.demo: demos[args.demo]} if args.demo else demos\n\n    for name, props_path in selected.items():\n        render_demo(name, props_path, npx_cmd)\n\n    return 0\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n","sourceCodeStart":114,"sourceCodeEnd":145,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/render_demo.py#L114-L145","documentation":"Raised by render_demo.py's main() as SystemExit when the positional demo argument names a demo that discover_demos() didn't find in PROPS_DIR. The message lists the exact available demo names, since discovery is filename-based — the argument must match a props file stem exactly (case-sensitive), with no extension.","triggerScenarios":"Running `python render_demo.py mydemo` where PROPS_DIR has no mydemo props file; typo or wrong case in the demo name; including a file extension in the argument.","commonSituations":"Typos and casing mismatches; referencing a demo that was renamed or removed; passing the filename (e.g. 'intro.json') instead of the stem ('intro').","solutions":["Copy an exact name from the error's Available demos list.","Run `python render_demo.py --list` to see all demos with descriptions before choosing.","Pass the stem only (no extension)."],"exampleFix":"# shell — before\npython render_demo.py Intro.json\n\n# shell — after\npython render_demo.py --list\npython render_demo.py intro","handlingStrategy":"validation","validationCode":"from render_demo import discover_demos\n\ndemos = discover_demos()\nif args.demo and args.demo not in demos:\n    raise SystemExit(f\"Unknown demo {args.demo!r}. Available: {', '.join(demos)}\")","typeGuard":"from render_demo import discover_demos\n\ndef demo_exists(name: str) -> bool:\n    return name in discover_demos()","tryCatchPattern":null,"preventionTips":["Always run `--list` first when unsure of demo names.","Pass the props file stem exactly, without extension, matching case.","After renames, grep for old demo names in scripts and docs."],"tags":["demos","cli","validation","rendering"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}