{"record":{"id":"6b5a47ccabe391ff","repo":"nexu-io/open-design","slug":"brief-mode-reads-markdown-text-raw-material-not-r","errorCode":null,"errorMessage":"brief mode reads markdown/text raw material, not rendered decks: {path}. Extract the text first (see scripts/pptx_qa.py's dump/inspect output for an existing .ppt/.pptx) and pass that as --source. If this is a deck Humanize PPT already rendered, run the presentation checkup instead: --qa-from <path-to-this-file.pptx>.","messagePattern":"brief mode reads markdown/text raw material, not rendered decks: (.+?)\\. Extract the text first \\(see scripts/pptx_qa\\.py's dump/inspect output for an existing \\.ppt/\\.pptx\\) and pass that as --source\\. If this is a deck Humanize PPT already rendered, run the presentation checkup instead: --qa-from <path-to-this-file\\.pptx>\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"plugins/community/humanize-ppt/scripts/humanize_ppt_v2.py","lineNumber":201,"sourceCode":"        shutil.rmtree(out)\n        out.mkdir(parents=True, exist_ok=True)\n        return None\n    marker_list = \" or \".join(HUMANIZE_OUT_MARKERS)\n    return (\n        f\"--out {out} already exists, is not empty, and does not look like a \"\n        f\"previous Humanize PPT run (no {marker_list} \"\n        \"at its root). Refusing to wipe it: it may hold content you did not intend \"\n        \"to lose. Point --out at a dedicated run directory, or pass --force to wipe \"\n        \"it anyway.\\n\"\n    )\n\n\ndef read_source(source):\n    path = Path(source).expanduser()\n    if not path.exists():\n        raise FileNotFoundError(f\"source not found: {path}\")\n    if path.suffix.lower() in {\".ppt\", \".pptx\"}:\n        raise ValueError(\n            f\"brief mode reads markdown/text raw material, not rendered decks: {path}. \"\n            \"Extract the text first (see scripts/pptx_qa.py's dump/inspect output for an \"\n            \"existing .ppt/.pptx) and pass that as --source. If this is a deck Humanize \"\n            \"PPT already rendered, run the presentation checkup instead: \"\n            \"--qa-from <path-to-this-file.pptx>.\"\n        )\n    text = path.read_text(encoding=\"utf-8\", errors=\"replace\")\n    return path, text, markdown_segments(text)\n\n\ndef strip_md(line):\n    line = re.sub(r\"^#{1,6}\\s*\", \"\", line.strip())\n    line = re.sub(r\"^[-*+]\\s+\", \"\", line)\n    line = re.sub(r\"^\\d+[.)]\\s+\", \"\", line)\n    line = re.sub(r\"[`*_>\\[\\]]\", \"\", line)\n    return line.strip()\n\n","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/plugins/community/humanize-ppt/scripts/humanize_ppt_v2.py#L183-L219","documentation":"Raised by read_source in humanize_ppt_v2.py as `raise ValueError(...)` when the --source path has a .ppt or .pptx suffix. Brief mode is designed to consume raw markdown/text raw material, not a rendered deck; passing a binary deck is treated as a user error. The message explicitly redirects: extract text first, or use --qa-from for an already-rendered deck checkup.","triggerScenarios":"Passing a PowerPoint file (`foo.pptx`, `FOO.PPT`) to `humanize_ppt_v2 --source` in brief mode. The suffix check is case-insensitive (`.lower()`), so any casing triggers it. Common when a user confuses the brief-mode input with the QA/inspection input.","commonSituations":"User downloads a .pptx and assumes humanize-ppt ingests decks directly; misreading the help text; pipeline stage miswired so the rendered deck feeds back into the brief stage; case-sensitive filesystem masking the issue on Windows/macOS.","solutions":["Convert the deck to markdown/text first — the message points at scripts/pptx_qa.py's dump/inspect output: run `python3 pptx_qa.py dump foo.pptx > foo.md` (or the project's documented extractor), then pass the extracted text as --source.","If the deck was already produced by Humanize PPT and you want a checkup, use `--qa-from foo.pptx` instead of `--source`.","If you actually have markdown but misnamed it .pptx, rename the file to .md/.txt and re-run.","Double-check the pipeline ordering: ensure the extraction stage runs before the humanize stage."],"exampleFix":"// before\npython3 humanize_ppt_v2.py --source deck.pptx\n# -> ValueError: brief mode reads markdown/text raw material, not rendered decks\n\n// after\npython3 pptx_qa.py dump deck.pptx > deck.md\npython3 humanize_ppt_v2.py --source deck.md","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nsource_path = Path(args.source).expanduser()\nif source_path.suffix.lower() in {\".ppt\", \".pptx\"}:\n    raise SystemExit(\n        \"Brief mode needs markdown/text, not a deck. \"\n        \"Run: python3 pptx_qa.py dump <deck> > out.md, then pass out.md as --source.\"\n    )\n# safe to pass to read_source","typeGuard":null,"tryCatchPattern":"try:\n    path, text, segments = read_source(args.source)\nexcept ValueError as exc:\n    raise SystemExit(str(exc)) from exc","preventionTips":["Establish a single upstream extraction step that always emits markdown, never a raw deck.","Document the two distinct inputs clearly: --source (raw material) vs --qa-from (rendered deck).","Add a file-extension preflight to the pipeline driver so misuse is caught with a friendlier message.","When in doubt, run pptx_qa.py dump first and inspect the extracted text."],"tags":["validation","file-format","powerpoint","humanize-ppt","python"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}