Environment
- python-sane: 2.9.2 (both the distro package and a fresh
pip install . from this repo)
- Python 3.13.13, openSUSE Leap 16.0
- SANE backend:
epsonscan2:Perfection V39/GT-S650:esci2:usb:ES010D:317
- Scanner: EPSON Perfection V39 / GT-S650 (USB)
Summary
SaneDev.snap() fails with _sane.error: Invalid argument (SANE_STATUS_INVAL) on every scan through the Epson epsonscan2 backend. The failure is independent of scan mode and depth — reproduced at 1-bit lineart and 8-bit grayscale. The same device scans cleanly with scanimage at both depths, so hardware, USB permissions and the backend itself are all functional.
Minimal reproducer
import sane
sane.init()
dev = sane.open("epsonscan2:Perfection V39/GT-S650:esci2:usb:ES010D:317")
dev.mode = "Grayscale"
dev.resolution = 300
dev.start()
print(dev.get_parameters()) # ('gray', 1, (2280, 2280), 8, 2280)
img = dev.snap() # raises _sane.error: Invalid argument
start() and get_parameters() return GOOD; the INVAL is raised inside SaneDev_snap's sane_read() loop. Cross-check: scanimage --mode Grayscale --resolution 300 > test.pnm completes and yields a valid 8-bit PGM.
Please see this issue in scantpaper for more details.
Environment
pip install .from this repo)epsonscan2:Perfection V39/GT-S650:esci2:usb:ES010D:317Summary
SaneDev.snap()fails with_sane.error: Invalid argument(SANE_STATUS_INVAL) on every scan through the Epsonepsonscan2backend. The failure is independent of scan mode and depth — reproduced at 1-bit lineart and 8-bit grayscale. The same device scans cleanly withscanimageat both depths, so hardware, USB permissions and the backend itself are all functional.Minimal reproducer
start()andget_parameters()return GOOD; the INVAL is raised insideSaneDev_snap'ssane_read()loop. Cross-check:scanimage --mode Grayscale --resolution 300 > test.pnmcompletes and yields a valid 8-bit PGM.Please see this issue in scantpaper for more details.