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

Fujitsu fi-7160 not working #49

Open gagolucasm opened 6 years ago

gagolucasm commented 6 years ago

Hi everyone,

I'm trying to scan duplex cards with my scanner (fi 7160) in Windows 10, but all that I get is images like this: 1

The output of list_all is:

pyinsane2/wia/rawapi.cpp(L422): A property has a type different from the one expected pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] Constraint found on property [sti_driver_version] but property not found pyinsane2/wia/rawapi.cpp(L563): Unknown var type for constraint pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=preferred_format) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [preferred_format] pyinsane2/wia/rawapi.cpp(L422): A property has a type different from the one expected pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] Constraint found on property [sti_driver_version] but property not found pyinsane2/wia/rawapi.cpp(L563): Unknown var type for constraint pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=preferred_format) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [preferred_format] Option 'current_intent' preset to 'image_type_color,maximize_quality' on ['fi-7160' (FUJITSU, fi-7160, scanner,streaming_video)] pyinsane2/wia/rawapi.cpp(L422): A property has a type different from the one expected pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] Constraint found on property [sti_driver_version] but property not found pyinsane2/wia/rawapi.cpp(L563): Unknown var type for constraint pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=preferred_format) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [preferred_format] Option 'format' preset to 'bmp' on ['fi-7160' (FUJITSU, fi-7160, scanner,streaming_video)] Failed to pre-set option 'preferred_format' on ['fi-7160' (FUJITSU, fi-7160, scanner,streaming_video)] pyinsane2/wia/rawapi.cpp(L644): Setting property [page_size]: properties->WriteMultiple() failed Unexpected exception UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 69: invalid continuation byte

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\logging__init.py", line 1317, in warning if self.isEnabledFor(WARNING): File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\logging\init__.py", line 1548, in isEnabledFor return level >= self.getEffectiveLevel() SystemError: PyEval_EvalFrameEx returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 58, in do self.result = self.func(self.kwargs) File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 150, in _set_property ret = _rawapi.set_property(dev_or_src, propname, propvalue) SystemError: returned a result with an error set Failed to pre-set option 'page_size' on ['fi-7160' (FUJITSU, fi-7160, scanner,streaming_video)] pyinsane2/wia/rawapi.cpp(L422): A property has a type different from the one expected pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] Constraint found on property [sti_driver_version] but property not found pyinsane2/wia/rawapi.cpp(L563): Unknown var type for constraint pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=item_category) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [item_category] pyinsane2/wia/properties.cpp(L866): Got unknown clsid from driver (property=preferred_format) pyinsane2/wia/rawapi.cpp(L568): Failed to parse constraint of [preferred_format] Option 'depth' preset to '24' on ['fi-7160' (FUJITSU, fi-7160, scanner,streaming_video)] pyinsane2/wia/rawapi.cpp(L224): WiaDevMgr->CreateDevice() failed pyinsane2/wia/rawapi.cpp(L225): HResult error code 0x80210005: Unknown error 0x80210005 Unexpected exception Traceback (most recent call last): File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 58, in do self.result = self.func(self.kwargs) File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 97, in _open raise WIAException("Failed to open {}".format(devid)) pyinsane2.wia.rawapi.WIAException: WIA: Failed to open {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000 Failed to access scanner ('{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000', 'EPSON Perfection V600') : WIA: Failed to open {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000 WIA: Failed to open {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000 Traceback (most recent call last): File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\abstract.py", line 629, in get_devices scanner = Scanner(dev[0]) File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\abstract.py", line 451, in init self._dev = rawapi.open(name) File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 102, in open return WiaAction(_open, devid=devid).wait() File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 50, in wait raise self.exception File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 58, in do self.result = self.func(**self.kwargs) File "C:\Users\NewPc\AppData\Local\Programs\Python\Python36\lib\site-packages\pyinsane2\wia\rawapi.py", line 97, in _open raise WIAException("Failed to open {}".format(devid)) pyinsane2.wia.rawapi.WIAException: WIA: Failed to open {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000 'fi-7160' (FUJITSU, fi-7160, scanner,streaming_video) Option: firmware_version Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 0500 Option: access_rights Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [3, 3] Value: read,write,read_can_be_deleted,read_write_can_be_deleted Option: full_item_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 0001\Root\Feeder Option: item_category Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['root', 'flatbed', 'feeder', 'feeder_front', 'feeder_back', 'film', 'folder', 'finished_file'] Value: feeder Option: item_flags Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: free Value: file,image,programmable_data_source,transfer Option: item_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: Feeder Option: dev_id Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0001 Option: vend_desc Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: FUJITSU Option: dev_desc Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: fi-7160 Option: dev_type Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: default Value: scanner,streaming_video Option: port_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: \.\Usbscan0 Option: dev_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: fi-7160 Option: server_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: local Option: remote_dev_id Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: Option: ui_clsid Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: {CDB3A172-0821-4246-9F5F-5E41A9767EDE} Option: hw_config Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['generic', 'scsi', 'usb', 'serial', 'parallel'] Value: 0 Option: baudrate Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: Option: sti_gen_capabilities Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 51 Option: wia_version Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 2.0 Option: driver_version Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 2.0.1.2 Option: pnp_id Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: \?\usb#vid_04c5&pid_132e#5&1c33cd9e&0&18#{6bdd1fc6-810f-11d0-bec7-08002be2092f} Option: document_handling_capabilities Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['auto_source', 'dup', 'detect_film_tpa', 'detect_stor', 'film_tpa', 'stor', 'detect_feed', 'detect_flat', 'detect_scan', 'dup', 'feed', 'flat', 'detect_dup', 'detect_dup_avail', 'detect_feed_avail'] Value: dup,feed Option: document_handling_status Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['feed_ready', 'flat_ready', 'dup_ready', 'flat_cover_up', 'path_cover_up', 'paper_jam', 'film_tpa_ready', 'storage_ready', 'storage_full', 'multiple_feed', 'device_attention', 'lamp_err'] Value: feed_ready,dup_ready Option: user_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: DESKTOP-HLEBMBT\NewPc Value: DESKTOP-HLEBMBT\NewPc Option: bits_per_channel Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 8 Option: buffer_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 65536 Option: channels_per_pixel Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 3 Option: compression Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 0, 1] Value: none Option: datatype Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 2, 3, 3, 3] Value: color Option: depth Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [1, 24, 24] Value: 24 Option: filename_extension Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: BMP Option: format Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: ['bmp', 'ciff', 'exif', 'flashpix', 'gif', 'ico', 'jbig', 'jpeg', 'jpeg2k', 'jpeg2kx', 'memorybmp', 'pdfa', 'photocd', 'pict', 'png', 'raw', 'rawrgb', 'tiff'] Value: bmp Option: icm_profile_name Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['', 'sRGB Color Space Profile.icm', 'sRGB Color Space Profile.icm'] Value: sRGB Color Space Profile.icm Option: item_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 0 Option: number_of_lines Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 2100 Option: pixels_per_line Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 1275 Option: planar Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: pixel Value: pixel Option: preferred_format Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: ['bmp', 'ciff', 'exif', 'flashpix', 'gif', 'ico', 'jbig', 'jpeg', 'jpeg2k', 'jpeg2kx', 'memorybmp', 'pdfa', 'photocd', 'pict', 'png', 'raw', 'rawrgb', 'tiff'] Value: bmp Option: tymed Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [1, 2, 2] Value: file Option: document_handling_select Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [32, 36] Value: front_only Option: optical_xres Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 600 Option: optical_yres Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 600 Option: page_height Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 14000 Option: page_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [1, 2, 2] Value: custom Option: page_width Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 8500 Option: pages Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 1) Value: 1 Option: scan_ahead_pages Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 100) Value: 100 Option: sheet_feeder_registration Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: left_justified Value: centered Option: show_preview_control Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: show_preview_control Value: dont_show_preview_control Option: brightness Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (-128, 0) Value: 0 Option: contrast Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (-128, 0) Value: 0 Option: current_intent Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 458759] Value: image_type_color,image_type_mask,maximize_quality,size_mask Option: max_horizontal_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 8500 Option: max_vertical_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 14000 Option: min_horizontal_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 2000 Option: min_vertical_size Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 2000 Option: orientation Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 0, 1] Value: portrait Option: photometric_interp Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 0, 1] Value: white_1 Option: rotation Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: [0, 0, 1] Value: portrait Option: supportes_child_item_creation Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: ro Constraint type: None Constraint: None Value: 0 Option: threshold Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (1, 128) Value: 128 Option: xextent Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (300, 1275) Value: 1275 Option: xpos Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 0) Value: 0 Option: xres Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (75, 150) Value: 150 Option: yextent Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (300, 2100) Value: 2100 Option: ypos Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 0) Value: 0 Option: yres Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (75, 150) Value: 150 Option: tl-x Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 1275) Value: 0 Option: br-x Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 1275) Value: 1275 Option: tl-y Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 2100) Value: 0 Option: br-y Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (0, 2100) Value: 2100 Option: resolution Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: (75, 150) Value: 150 Option: source Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: ['0001\Root\Feeder'] Value: 0001\Root\Feeder Option: mode Title: Desc: Type: None Unit: None Size: 4 Capabilities: Access: rw Constraint type: None Constraint: ['Color', 'Gray', 'BW'] Value: Color

What should I try?

Thanks in advance

jflesch commented 6 years ago

Can you try IronScanner and submit a scan report please? It will provide much more detailed (and readable) information.

gagolucasm commented 6 years ago

Sure, here it is: https://openpaper.work/en-us/scanner_db/report/132/

jflesch commented 6 years ago

Hm, weird, there is nothing abnormal in the settings or the traces but the output is obviously distorted :/ BTW, what did you scan for this test ? Was the test page white ?

gagolucasm commented 6 years ago

image

This is the page, what do you think that I could try?

jflesch commented 5 years ago

Development has moved to Gnome Gitlab: https://gitlab.gnome.org/World/OpenPaperwork/pyinsane/issues/49 . If you're still willing to try to fix this issue, there is something you can try: I've rewritten Pyinsane in C (better, faster, stronger ;). I've made an experimental build of IronScanner using Libinsane: https://jflesch.kwain.net/~jflesch/paperwork/ironscanner-win64-libinsane-20181228.zip . Can you give a try please ?