{"record":{"id":"8854d6a7446b2175","repo":"ocrmypdf/OCRmyPDF","slug":"the-following-languages-are-for-tesseract-s-intern","errorCode":null,"errorMessage":"The following languages are for Tesseract's internal use and should not be issued explicitly: {', '.join(blocked)}\\nRemove them from the -l/--language argument.","messagePattern":"The following languages are for Tesseract's internal use and should not be issued explicitly: (.+?)\\\\nRemove them from the -l/--language argument\\.","errorType":"validation","errorClass":"BadArgsError","httpStatus":null,"severity":"error","filePath":"src/ocrmypdf/_validation.py","lineNumber":59,"sourceCode":"\ndef check_platform() -> None:\n    if sys.maxsize <= 2**32:  # pragma: no cover\n        log.warning(\n            \"You are running OCRmyPDF in a 32-bit (x86) Python interpreter. \"\n            \"This is not supported. 32-bit does not have enough address space \"\n            \"to process large files. \"\n            \"Please use a 64-bit (x86-64) version of Python.\"\n        )\n\n\ndef check_options_languages(\n    options: OcrOptions, ocr_engine_languages: AbstractSet[str]\n) -> None:\n    # Check for blocked languages first, before checking if they're installed\n    DENIED_LANGUAGES = {'equ', 'osd'}\n    blocked = DENIED_LANGUAGES & set(options.languages)\n    if blocked:\n        raise BadArgsError(\n            \"The following languages are for Tesseract's internal use and \"\n            \"should not be issued explicitly: \"\n            f\"{', '.join(blocked)}\\n\"\n            \"Remove them from the -l/--language argument.\"\n        )\n\n    if not ocr_engine_languages:\n        return\n\n    missing_languages = set(options.languages) - set(ocr_engine_languages)\n    if missing_languages:\n        lang_text = '\\n'.join(lang for lang in missing_languages)\n        msg = (\n            \"OCR engine does not have language data for the following \"\n            \"requested languages: \\n\"\n            f\"{lang_text}\\n\"\n            \"Please install the appropriate language data for your OCR engine.\\n\"\n            \"\\n\"","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/ocrmypdf/OCRmyPDF/blob/5074a0b0e109362422b768fd271ed84bf717c4ec/src/ocrmypdf/_validation.py#L41-L77","documentation":"Raised when the -l/--language argument includes 'equ' (math equations) or 'osd' (orientation and script detection). These Tesseract models are internal helpers, not standalone recognition languages, so ocrmypdf blocks them explicitly.","triggerScenarios":"options.languages containing 'equ' or 'osd', e.g. ocrmypdf -l osd or -l eng+equ; checked before installed-language validation.","commonSituations":"Users listing all outputs of tesseract --list-langs as language options; tutorials that mention osd for orientation detection.","solutions":["Remove 'equ' and 'osd' from the -l/--language argument","For orientation, use --rotate-pages instead of the osd model","For equations, rely on the main language model"],"exampleFix":"# before\nocrmypdf -l eng+osd in.pdf out.pdf\n# after\nocrmypdf -l eng --rotate-pages in.pdf out.pdf","handlingStrategy":"validation","validationCode":"DENIED = {'equ', 'osd'}\nlangs = [l for l in requested_langs if l not in DENIED]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never copy tesseract --list-langs output wholesale into -l"],"tags":["ocr","ocrmypdf","tesseract","language-codes"],"backgroundTag":"invalid-language-code","analyzedSha":"5074a0b0e109362422b768fd271ed84bf717c4ec","analyzedAt":"2026-08-27T11:57:38.523Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}