{"record":{"id":"243dacf793d46576","repo":"ocrmypdf/OCRmyPDF","slug":"ocrmypdf-ocr-verbose-is-ignored-use-ocrmypdf-co","errorCode":null,"errorMessage":"ocrmypdf.ocr(verbose=) is ignored. Use ocrmypdf.configure_logging().","messagePattern":"ocrmypdf\\.ocr\\(verbose=\\) is ignored\\. Use ocrmypdf\\.configure_logging\\(\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/ocrmypdf/api.py","lineNumber":830,"sourceCode":"        # No new variable names should be assigned until these two steps are run\n        create_options_kwargs = {\n            k: v\n            for k, v in locals().items()\n            if k\n            not in {\n                'input_file_or_options',\n                'input_file',\n                'output_file',\n                'kwargs',\n                'plugin_manager',\n            }\n        }\n        create_options_kwargs.update(kwargs)\n\n        parser = get_parser()\n        with _plugin_session(plugins, plugin_manager, parser=parser) as plugin_manager:\n            if 'verbose' in kwargs:\n                warn(\n                    \"ocrmypdf.ocr(verbose=) is ignored. \"\n                    \"Use ocrmypdf.configure_logging().\"\n                )\n\n            # Warn about deprecated jbig2 options and remove from kwargs\n            if jbig2_lossy:\n                warn(\n                    \"jbig2_lossy is deprecated and will be ignored. \"\n                    \"Lossy JBIG2 has been removed due to character substitution risks.\"\n                )\n                create_options_kwargs.pop('jbig2_lossy', None)\n            if jbig2_page_group_size:\n                warn(\"jbig2_page_group_size is deprecated and will be ignored.\")\n                create_options_kwargs.pop('jbig2_page_group_size', None)\n\n            options = create_options(\n                input_file=input_file,\n                output_file=output_file,","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/ocrmypdf/OCRmyPDF/blob/5074a0b0e109362422b768fd271ed84bf717c4ec/src/ocrmypdf/api.py#L812-L848","documentation":"ocrmypdf.ocr(verbose=...) has no effect; logging configuration must go through ocrmypdf.configure_logging(). A warning is emitted and the argument is ignored.","triggerScenarios":"Passing verbose= to ocrmypdf.ocr() (it's accepted solely for backward compatibility and dropped).","commonSituations":"Older OCRmyPDF 7.x-era scripts where verbose=True was valid; the public API moved verbosity control to configure_logging().","solutions":["Remove verbose= from the ocr() call","Call ocrmypdf.configure_logging() (e.g. with logging.DEBUG) to control verbosity","Update old scripts that predate the logging API change"],"exampleFix":"# before\nocrmypdf.ocr('in.pdf', 'out.pdf', verbose=True)\n# after\nocrmypdf.configure_logging(ocrmypdf.logging.DEBUG)\nocrmypdf.ocr('in.pdf', 'out.pdf')","handlingStrategy":"validation","validationCode":"kwargs.pop('verbose', None)\\nocrmypdf.configure_logging(ocrmypdf.logging.INFO)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure logging via configure_logging, never verbose=","Update pre-8.x era scripts when upgrading OCRmyPDF"],"tags":["deprecation","logging","api"],"backgroundTag":"deprecated-keyword-argument","analyzedSha":"5074a0b0e109362422b768fd271ed84bf717c4ec","analyzedAt":"2026-08-27T11:57:38.523Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}