tesserocr
tesserocr copied to clipboard
Segfault when used with PyMuPDF (aka fitz)
Tesserocr segfaults when used in conjunction with PyMuPDF (aka fitz).
from PIL import Image
import fitz # bug only seems to occur when fitz is imported *first*
import tesserocr
img = Image.open("img.png")
tesserocr.image_to_text(img) # segfault occurs here
I haven't fully investigated the cause but maybe it's related to https://github.com/sirfz/tesserocr/issues/32 as both tesserocr and fitz look at TESSDATA
.
As a workaround I can simply reorder the imports.