【发布时间】:2019-04-23 16:26:23
【问题描述】:
我正在尝试将 pdf 文件转换为 Image,然后使用 pytesseract 对文件进行 ocr。我能够在 linux 本地路径中存在但不使用 hdfs 路径的文件上成功完成此操作。
from wand.image import Image as wi
>>> wi(filename = 'hdfs://boboda02.boobo.com:8020/bda/clamsops/raw/personal_brella_test/09_29_2015_090902.pdf',resolution = 300)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sam/my_env_1/lib/python2.7/site-packages/Wand-0.4.2-py2.7.egg/wand/image.py", line 2534, in __init__
File "/home/sam/my_env_1/lib/python2.7/site-packages/Wand-0.4.2-py2.7.egg/wand/image.py", line 2601, in read
File "/home/sam/my_env_1/lib/python2.7/site-packages/Wand-0.4.2-py2.7.egg/wand/resource.py", line 222, in raise_exception
wand.exceptions.MissingDelegateError: no decode delegate for this image format `//boboDA02.boobo.COM' @ error/constitute.c/ReadImage/501
【问题讨论】:
标签: hadoop pdf image-processing pyspark wand