calesthio/OpenMontage · error · SystemExit
Unknown demo '{args.demo}'. Available demos: {available}
Error message
Unknown demo '{args.demo}'. Available demos: {available} What it means
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.
Source
Thrown at render_demo.py:132
)
parser.add_argument("demo", nargs="?", help="Render one named demo instead of all demos.")
parser.add_argument("--list", action="store_true", help="List available demo fixtures and exit.")
args = parser.parse_args(argv)
demos = discover_demos()
if not demos:
raise SystemExit(f"Error: No demo prop files were found in {PROPS_DIR}.")
if args.list:
print("Available zero-key demos:")
for name in demos:
description = DEMO_DESCRIPTIONS.get(name, "Checked-in Remotion demo")
print(f" {name:20} {description}")
return 0
if args.demo and args.demo not in demos:
available = ", ".join(demos)
raise SystemExit(f"Unknown demo '{args.demo}'. Available demos: {available}")
npx_cmd = ensure_demo_environment()
selected = {args.demo: demos[args.demo]} if args.demo else demos
for name, props_path in selected.items():
render_demo(name, props_path, npx_cmd)
return 0
if __name__ == "__main__":
sys.exit(main())
View on GitHub (pinned to 95e1c3d0ab)
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).
Example fix
# shell — before python render_demo.py Intro.json # shell — after python render_demo.py --list python render_demo.py intro
Defensive patterns
Strategy: validation
Validate before calling
from render_demo import discover_demos
demos = discover_demos()
if args.demo and args.demo not in demos:
raise SystemExit(f"Unknown demo {args.demo!r}. Available: {', '.join(demos)}") Type guard
from render_demo import discover_demos
def demo_exists(name: str) -> bool:
return name in discover_demos() Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Typos and casing mismatches; referencing a demo that was renamed or removed; passing the filename (e.g. 'intro.json') instead of the stem ('intro').
Related errors
- Error: {path} must define at least one cut.
- Error: No demo prop files were found in {PROPS_DIR}.
- ${res.status} ${url}
- fetch failed ${r.status}: ${url}
- path escapes project
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/6fb96ee741148090.
Report an issue: GitHub.