Document AI ProcessOptions that error on the wrong processor type
Shows how to fix document AI ProcessOptions that error on the wrong processor type. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Only set ocrconfig on OCR or form parser processors, only use pagerange with online ProcessDocument calls, and check that your processor version supports schema overrides before passing schema_override. Do not copy ProcessOptions blindly between processor types.
Steps
- Do not copy ProcessOptions blindly between processor types. Only set ocrconfig on OCR or form parser processors, only use pagerange with online ProcessDocument calls, and check that your processor version supports schema overrides before passing schema_override. Each of these returns a hard error rather than being silently ignored.
When to use
You are seeing this: Do not copy ProcessOptions blindly between processor types. Use this skill when you run into "Document AI ProcessOptions that error on the wrong processor type".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.