Skip to content

Reading image files does not work in case of symlinks in the path #4396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
larrasket opened this issue Mar 7, 2025 · 1 comment
Closed

Comments

@larrasket
Copy link

Current Behavior

Reading /tmp/tesseract.png results in:

Error in fopenReadStream: failed to open locally with tail tesseract.png for filename /tmp/tesseract.png
Leptonica Error in findFileFormat: image file not found: /tmp/tesseract.png
Error in fopenReadStream: failed to open locally with tail �PNG for filename �PNG
Leptonica Error in pixRead: image file not found: �PNG
Image file �PNG cannot be read!
Error during processing.

However, reading without the tmp symbolic link (which is the case in Mac):

larrasket [~]$ tesseract /private/tmp/tesseract.png stdout
Estimating resolution as 144
© Iong_iist

Which works properly.

Expected Behavior

Reading working properly in both cases.

Suggested Fix

No response

tesseract -v

tesseract 5.5.0
leptonica-1.85.0
libgif 5.2.2 : libjpeg 8d (libjpeg-turbo 3.0.4) : libpng 1.6.46 : libtiff 4.7.0 : zlib 1.2.12 : libwebp 1.5.0 : libopenjp2 2.5.3
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found libarchive 3.7.7 zlib/1.2.12 liblzma/5.6.3 bz2lib/1.0.8 liblz4/1.10.0 libzstd/1.5.6
Found libcurl/8.7.1 SecureTransport (LibreSSL/3.3.6) zlib/1.2.12 nghttp2/1.63.0

Operating System

macOS 14 Sonoma

Other Operating System

No response

uname -a

Darwin larrasket 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64 x86_64

Compiler

No response

CPU

No response

Virtualization / Containers

No response

Other Information

No response

@amitdo
Copy link
Collaborator

amitdo commented Mar 8, 2025

Duplicate of #4333.

@amitdo amitdo closed this as completed Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants