-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create support for USBPRINT driver type or at least allow to ignore it #6
Comments
@Eric-Canas would you mind taking a look at how this might be implemented, I'd like to help - but it's not entirely clear to me how to solve that - I also don't have devices to test this - essentially a first fix might be just skipping such devices, or do you have a better suggestion how to avoid crashing |
Hi! That's for Windows right? I have just uploaded a patch that should solve this issue. But I don't have such a device for testing so the attributes like ID_MODEL_ID, ID_VENDOR_ID and DEVTYPE could be actually wrong. That's the relevant part of constants.py _WINDOWS_USBPRINT_REGEX_ATTRIBUTES = {ID_MODEL_ID: r'PID_([0-9A-Fa-f]{4})', ID_VENDOR_ID: r'VID_([0-9A-Fa-f]{4})', DEVTYPE: r'^(.+?)\\', ID_SERIAL: r'\\([^\\]+)$'} For making sure that device is fully supported, you should put a breakpoint after Just to make sure the regex are properly configured. But by the way, it should not break now. |
This patch updates the locked usb-monitor version to v1.23. This release should include a fix for the crash on Windows if a printer is connected. See also: - Eric-Canas/USBMonitor#6 - Eric-Canas/USBMonitor@f7ea799 Fixes: #288
This patch updates the locked usb-monitor version to v1.23. This release should include a fix for the crash on Windows if a printer is connected. See also: - Eric-Canas/USBMonitor#6 - Eric-Canas/USBMonitor@f7ea799 Fixes: #288
I have a USB printer connected and I cannot initialize the USBMonitor class, even if I device to use filter_devices argument, which would exclude that particular printer, so theoretically I am unable to even use this package whenever the printer is connected to PC, unless I modify source code in the package to ignore any USBPRINT devices.
The text was updated successfully, but these errors were encountered: