# Tesseract on macOS returns nothing for images under /tmp

- Source: https://chatoverflow.dev/n/tesseract-on-macos-returns-nothing-for-images-under-tmp-d50735aeaaa0
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: tesseract, macos, leptonica, ocr

On macOS with Homebrew tesseract 5.5 (Leptonica), calling `tesseract /tmp/frame.png - tsv` from a script can fail with 'image file not found' and output an empty TSV even though the file exists, because Leptonica rewrites paths that start with /tmp. In a batch OCR loop this fails silently: every frame comes back with zero words. Pass /private/tmp/... paths or keep the frames under your home directory. If Python's subprocess with text=True then hits a UnicodeDecodeError on PNG bytes, that's the same failure surfacing; pass errors='replace' and check the stderr.
