HKUDS/DeepTutor · error · MinerUError
MinerU produced no output directory.
Error message
MinerU produced no output directory.
What it means
After a supposedly successful MinerU CLI run, no subdirectory exists under output_base, so there is nothing to post-process. A defensive guard against CLI output-layout changes.
Source
Thrown at deeptutor/services/parsing/engines/mineru/backend.py:169
cli_command=cli_command,
extra_env=subprocess_env,
)
if not ok:
raise MinerUError(
"Local MinerU parsing failed. Ensure MinerU is installed "
"(`pip install mineru`) or switch to cloud mode in Settings → MinerU."
)
working_dir = output_base / pdf_path.stem
if not working_dir.is_dir():
# Defensive: the CLI names its output dir after the PDF stem, but fall
# back to the newest sub-directory if that assumption ever breaks.
subdirs = sorted(
(d for d in output_base.iterdir() if d.is_dir()),
key=lambda d: d.stat().st_mtime,
reverse=True,
)
if not subdirs:
raise MinerUError("MinerU produced no output directory.")
working_dir = subdirs[0]
return working_dir
__all__ = ["MinerUError", "local_cli_probe", "local_cli_version", "parse_pdf_to_workdir"]
View on GitHub (pinned to 3e82f13042)
Solutions
- Upgrade/downgrade the mineru package to a tested version.
- Inspect output_base after a manual run to see actual layout; report a bug if layout changed.
- Re-run the parse — transient filesystem/permission issue.
Defensive patterns
Strategy: retry
Try / catch
try:
wd = parse_pdf_to_workdir(pdf, out, cfg)
except MinerUError as e:
if "no output directory" in str(e):
shutil.rmtree(out, ignore_errors=True); retry_once() Prevention
- Pin the mineru package version you validated.
- Clean the output base dir between runs to avoid stale-layout confusion.
When it happens
Trigger: The CLI's output dir naming differs (version change), output went elsewhere, or the run wrote files directly into output_base.
Common situations: MinerU CLI version upgrade changing output layout; output_base on a filesystem with odd mtime/dir behavior.
Related errors
- Configured MinerU CLI path is not an executable file: {probe
- Local MinerU parsing failed. Ensure MinerU is installed (`pi
- MinerU failed to parse the document: {err}
- The model provider interrupted this response. Please retry.
- Unable to reach the model provider. Please retry.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/ae1c1eb384c7e4d2.
Report an issue: GitHub.