jlsutherland / doc2text

Detect text blocks and OCR poorly scanned PDFs in bulk. Python module available via pip.
MIT License
1.27k stars 98 forks source link

What is wrong with this ? Can someone please explain ? #11

Open iamvc7 opened 8 years ago

iamvc7 commented 8 years ago

doc.read('/home/ubuntu/doc2text/test.jpg') File "/usr/local/lib/python2.7/dist-packages/doc2text/init.py", line 78, in read raise FileNotAcceptedException

sashasimkin commented 8 years ago

Looking at source, the mime type of your image is not one of:

acceptable_mime = ["image/bmp", "image/png", "image/tiff", "image/jpeg", "image/jpg", "video/JPEG", "video/jpeg2000"]

Also, it should print you actual mime-type right before raising the exception.