title: Why pytesseract can't handle OSD mode?
body: <p>I cant run <strong>OSD</strong> mode in <strong>pytesseract</strong> on docker image on Ubuntu. On windows, this command works like charm:</p>
  <pre><code>pytesseract.image_to_osd(image)
  </code></pre>
  <p>But inside docker image, it causes the following error. What I want to achieve is reading the rotation info using OSD.</p>
  <pre><code>File &quot;/usr/local/lib/python3.9/site-packages/pytesseract/pytesseract.py&quot;, line 263, in run_tesseract
  raise TesseractError(proc.returncode, get_errors(error_string))pytesseract.pytesseract.TesseractError: (1, 'Tesseract Open Source OCR Engine v5.0.0-alpha-20210401 with Leptonica UZN file /tmp/tess__cujlspf loaded. Estimating resolution as 169 UZN file /tmp/tess__cujlspf loaded. Warning. Invalid resolution 0 dpi. Using 70 instead. Too few characters. Skipping this page Error during processing.')
  </code></pre>
  <p>Tesseract is installed correctly because all other methods like image_to_string are working properly. The suprising thing is that when I call the OSD directly from terminal, it works</p>
  <pre><code>tesseract /images/1.jpg  output --psm 0
  # cat output.osd
  Page number: 0
  Orientation in degrees: 0
  Rotate: 0
  Orientation confidence: 5.69
  Script: Cyrillic
  Script confidence: 0.10
  </code></pre>
  <p>Is there some bug in Pytesseract or any workaround? The rotation info is not included in any other Tesseract methods, only in this OSD.
  Many thanks</p>