tesserocr._tesserocr.file_to_text RuntimeError: Failed to read picture

在使用如下例子测试tesserocr时,报错 File "tesserocr.pyx", line 2441, in tesserocr._tesserocr.file_to_text

RuntimeError: Failed to read picture

import tesserocr
print(tesserocr.file_to_text("C:/Users/帅比/Desktop/image.png"))

tesserocr.file_to_text函数的路径参数中不能有中文字符,否则就会报这个错。经测,在换入一个纯英文的路径后可以正常运行

猜你喜欢

转载自blog.csdn.net/BobYuan888/article/details/80987178