openflexure-microscope-snesclient not working on current v3-server-build
Bug report
Summary
the snes-client is not working on the current v3-server-build. I know there is a repo for the snesclient, but I assume this is more a problem of "noone hasn't tested the snesclient against v3" instead of a problem with snesclient itself, so i report it here.
Configuration
- Sever version: v3
- Release/Branch: v3.0.0-alpha1
-
Hardware Configuration:
- V7.0.0-Beta4-Hardware
- details see here
- Raspberry Pi 4B/4GB
- Raspberry Pi Camera v2
- Sangaboard v0.5
- some random usb-snes-gamepad (see below for details)
- V7.0.0-Beta4-Hardware
Steps to reproduce
- Plug in gamepad
Relevant logs and/or screenshots
-
no relevant logs in webapp or
ofm log -
the gamepad itself works fine under linux out of the box as gamepad. tested on fedora41 and archlinux (6.14)
-
systemd status:
$ sudo systemctl status openflexure-microscope-snesclient.service
× openflexure-microscope-snesclient.service - Start the OpenFlexure SNES Client looping application
Loaded: loaded (/etc/systemd/system/openflexure-microscope-snesclient.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2025-06-29 14:56:46 CEST; 18min ago
Duration: 449ms
Process: 948 ExecStart=/var/openflexure/application/openflexure-microscope-snesclient/.venv/bin/python3 /var/openflexure/application/openflexure-microscope-snesclient/main.py (code=exited, status=1/FAILURE)
Main PID: 948 (code=exited, status=1/FAILURE)
CPU: 1.126s
Jun 29 14:56:46 cyberscope python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/connectionpool.py", line 38, in <module>
Jun 29 14:56:46 cyberscope python3[948]: from .response import HTTPResponse
Jun 29 14:56:46 cyberscope python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/response.py", line 9, in <module>
Jun 29 14:56:46 cyberscope python3[948]: from ._collections import HTTPHeaderDict
Jun 29 14:56:46 cyberscope python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/_collections.py", line 1, in <module>
Jun 29 14:56:46 cyberscope python3[948]: from collections import Mapping, MutableMapping
Jun 29 14:56:46 cyberscope python3[948]: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
Jun 29 14:56:46 cyberscope systemd[1]: openflexure-microscope-snesclient.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 14:56:46 cyberscope systemd[1]: openflexure-microscope-snesclient.service: Failed with result 'exit-code'.
Jun 29 14:56:46 cyberscope systemd[1]: openflexure-microscope-snesclient.service: Consumed 1.126s CPU time.
- systemd-journal
$ sudo journalctl --no-pager --no-hostname -u openflexure-microscope-snesclient.service
Jun 26 03:04:22 systemd[1]: Started openflexure-microscope-snesclient.service - Start the OpenFlexure SNES Client looping application.
Jun 26 03:04:24 python3[616]: Traceback (most recent call last):
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/main.py", line 10, in <module>
Jun 26 03:04:24 python3[616]: import requests
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/__init__.py", line 58, in <module>
Jun 26 03:04:24 python3[616]: from . import utils
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/utils.py", line 26, in <module>
Jun 26 03:04:24 python3[616]: from .compat import parse_http_list as _parse_list_header
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/compat.py", line 7, in <module>
Jun 26 03:04:24 python3[616]: from .packages import chardet
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/__init__.py", line 3, in <module>
Jun 26 03:04:24 python3[616]: from . import urllib3
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/__init__.py", line 10, in <module>
Jun 26 03:04:24 python3[616]: from .connectionpool import (
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/connectionpool.py", line 38, in <module>
Jun 26 03:04:24 python3[616]: from .response import HTTPResponse
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/response.py", line 9, in <module>
Jun 26 03:04:24 python3[616]: from ._collections import HTTPHeaderDict
Jun 26 03:04:24 python3[616]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/_collections.py", line 1, in <module>
Jun 26 03:04:24 python3[616]: from collections import Mapping, MutableMapping
Jun 26 03:04:24 python3[616]: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
Jun 26 03:04:24 systemd[1]: openflexure-microscope-snesclient.service: Main process exited, code=exited, status=1/FAILURE
Jun 26 03:04:24 systemd[1]: openflexure-microscope-snesclient.service: Failed with result 'exit-code'.
Jun 26 03:04:24 systemd[1]: openflexure-microscope-snesclient.service: Consumed 1.148s CPU time.
Jun 29 14:56:46 systemd[1]: Started openflexure-microscope-snesclient.service - Start the OpenFlexure SNES Client looping application.
Jun 29 14:56:46 python3[948]: Traceback (most recent call last):
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/main.py", line 10, in <module>
Jun 29 14:56:46 python3[948]: import requests
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/__init__.py", line 58, in <module>
Jun 29 14:56:46 python3[948]: from . import utils
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/utils.py", line 26, in <module>
Jun 29 14:56:46 python3[948]: from .compat import parse_http_list as _parse_list_header
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/compat.py", line 7, in <module>
Jun 29 14:56:46 python3[948]: from .packages import chardet
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/__init__.py", line 3, in <module>
Jun 29 14:56:46 python3[948]: from . import urllib3
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/__init__.py", line 10, in <module>
Jun 29 14:56:46 python3[948]: from .connectionpool import (
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/connectionpool.py", line 38, in <module>
Jun 29 14:56:46 python3[948]: from .response import HTTPResponse
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/response.py", line 9, in <module>
Jun 29 14:56:46 python3[948]: from ._collections import HTTPHeaderDict
Jun 29 14:56:46 python3[948]: File "/var/openflexure/application/openflexure-microscope-snesclient/.venv/lib/python3.11/site-packages/requests/packages/urllib3/_collections.py", line 1, in <module>
Jun 29 14:56:46 python3[948]: from collections import Mapping, MutableMapping
Jun 29 14:56:46 python3[948]: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
Jun 29 14:56:46 systemd[1]: openflexure-microscope-snesclient.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 14:56:46 systemd[1]: openflexure-microscope-snesclient.service: Failed with result 'exit-code'.
Jun 29 14:56:46 systemd[1]: openflexure-microscope-snesclient.service: Consumed 1.126s CPU time.
Additional details
lsusb-output for affected device:
# lsusb -d "081f:e401" -v
Bus 001 Device 004: ID 081f:e401 Manta gamepad
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x081f Manta
idProduct 0xe401 gamepad
bcdDevice 1.06
iManufacturer 0
iProduct 2 USB gamepad
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 98
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)
- dmesg-output while plugging in:
[ 123.361385] usb 1-1.3: new low-speed USB device number 4 using xhci_hcd
[ 123.456220] usb 1-1.3: New USB device found, idVendor=081f, idProduct=e401, bcdDevice= 1.06
[ 123.456247] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 123.456257] usb 1-1.3: Product: USB gamepad
[ 123.470667] input: USB gamepad as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:081F:E401.0002/input/input5
[ 123.471080] hid-generic 0003:081F:E401.0002: input,hidraw0: USB HID v1.10 Joystick [USB gamepad] on usb-0000:01:00.0-1.3/input0