openpaperwork / pyinsane

Python library to access and use image scanners (Linux/Windows/etc) (Sane/WIA) -- Moved to Gnome's Gitlab
https://gitlab.gnome.org/World/OpenPaperwork/pyinsane
63 stars 24 forks source link

Epson DS-310 #46

Closed lorenzhs closed 6 years ago

lorenzhs commented 6 years ago

I have an Epson DS-310 document scanner (feeder only, no flatbed). It works fine with sane (scanimage) and simple-scan but when I click the scan button in paperwork (1.2.4) it tells me "Scanner not found (is your scanner turned on ?) (error was: <class 'pyinsane2.sane.rawapi.SaneStatus'>: Data is invalid (4))". I installed paperwork via stdeb / pypi-install on an up-to-date Debian unstable.

I've attached paperwork's diagnostics: paperwork-diagnostics-epson-ds-310.txt

jflesch commented 6 years ago

Hello,

Paperwork diagnostic output just show that Sane or your driver returns SANE_STATUS_INVAL. It doesn't tell us anything else.

Can you post a scan report using IronScanner please ? It will include much more detailed informations, including Sane debug output and your driver debug output.

lorenzhs commented 6 years ago

OK, will do when I get home. For the record, the DS-310 is identical to the ES-200 and both are related the DS-360W / ES-300W, which is the same scanner with wifi and a battery.

lorenzhs commented 6 years ago

There you go: https://openpaper.work/en-us/scanner_db/report/120/ - it actually scanned successfully after what ignoring(?) the pyinsane errors :)

jflesch commented 6 years ago

Did it use the automatic document feeder as expected ? oO

lorenzhs commented 6 years ago

Yup! I didn't put the paper in completely straight so it's a bit crooked but it worked nicely

jflesch commented 6 years ago

Weird ... I guess I can make it work but .. weird. (and annoying .. the workaround will be ugly)

jflesch commented 6 years ago

Hmm, actually, since you have only one source, I can work around this issue easily. If there is just one source, I just have to not select one --> no selection = no error --> no problem :)

jflesch commented 6 years ago

8a1acec874d4b0a31f4a4b75c8d4bc91c48d88e8

jflesch commented 6 years ago

Flatpak version will include the fix: https://origami.openpaper.work/#/builders/7/builds/67

jflesch commented 6 years ago

Can you install the version from git and confirm the workaround works please ?

lorenzhs commented 6 years ago

I’ll give it a try as soon as I get a chance. Thanks for the quick response!

ivanfet commented 6 years ago

Thanks for the feedback. I'm using the flatpack version of Paperwork. I will lookout for the next flatpack version and try that.

lorenzhs commented 6 years ago

Yup, it scans now. But processing the scanned document seemingly takes forever (I have two tesseract processes at 12 minutes of CPU time right now for a single page), when run manually tesseract takes ~1s per page for me so that's definitely unusual. It's also still throwing SaneExceptions, but these don't prevent it from scanning. Diagnostics

(it seems there are other issues with tesseract 4 as well, have you tried out this combination yet? Paperwork sees and indexes every word in the document as b'word'. This is a very separate issue though. I'll continue using my custom scanning/OCR pipeline for now, I guess. See the resulting paper.1.words )

jflesch commented 6 years ago

You're using Tesseract 4.0.0alpha in Paperwork. This version is buggy and randomly slow. I suggest you either update it or switch back to Tesseract 3.05.

jflesch commented 6 years ago

Anyway, since your scan problem is solved, I'm closing this ticket :) Feel free to comment here if you still have issues with scanning, and I'll reopen this ticket.