I've been attempting to configure ds4drv, but have hit a snag regarding hidraw/USB connectivity and the 'NoneType' object has no attribute '...' Python exception. The exception occurs when attempting to switch away from either of the mame or snes profiles. I've tried updating to the current development version of ds4drv, as well as performing a bit of debugging myself: trying emulate-xpad = false in the two profiles on the supposition it may have been carried over from the xpad profile, and going so far as to modify actions/input.py in an attempt to bypass the thrown exception - to no avail. Please see the relevant details below.
OS: Linux Mint 16 (Debian base)
uname -a: Linux atla 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[info][controller 1] Created devices /dev/input/js2 (joystick) /dev/input/event15 (evdev)
[info][controller 1] Connected to USB Controller (1C:66:6D:0D:09:81 hidraw0)
[info][hidraw] Scanning for devices
[info][controller 1] Battery: Fully charged
[info][controller 1] Switching to profile: xpad
[info][controller 1] Switching to profile: mame
[info][controller 1] Switching to profile: snes
[error][controller 1] Failed to execute action: 'NoneType' object has no attribute 'close'
Traceback (most recent call last):
File "/usr/local/bin/ds4drv", line 9, in <module>
load_entry_point('ds4drv==0.5.0', 'console_scripts', 'ds4drv')()
File "/usr/local/lib/python2.7/dist-packages/ds4drv-0.5.0-py2.7.egg/ds4drv/__main__.py", line 154, in main
for device in backend.devices:
File "/usr/local/lib/python2.7/dist-packages/ds4drv-0.5.0-py2.7.egg/ds4drv/backends/hidraw.py", line 148, in devices
for hidraw_device in itertools.chain(existing_devices, future_devices):
File "/usr/local/lib/python2.7/dist-packages/ds4drv-0.5.0-py2.7.egg/ds4drv/backends/hidraw.py", line 127, in _get_future_devices
for device in iter(monitor.poll, None):
File "/usr/local/lib/python2.7/dist-packages/pyudev/monitor.py", line 340, in poll
rlist, _, _ = select.select([self], [], [], timeout)
KeyboardInterrupt
To note: When using the pip release, the error provided an actual stack trace. The exception occurred within Python's common evdev framework, and traced back into the ds4drv application at line 75 of the aforementioned actions/input.py file. Due to this, I attempted to circumvent the exception using this patch, although it didn't change anything: (I also removed, cleaned, and re-installed ds4drv with this patch added just to be sure.)
--- ds4drv/actions/input.py 2014-06-22 00:39:46.841204526 -0400
+++ /usr/local/lib/python2.7/dist-packages/ds4drv-0.5.0-py2.7.egg/ds4drv/actions/input.py 2014-06-22 00:26:13.545201662 -0400
@@ -72,7 +72,8 @@
self.mouse = None
if self.joystick and self.joystick_layout != joystick_layout:
- self.joystick.device.close()
+ if self.joystick.device is not None:
+ self.joystick.device.close()
joystick = create_uinput_device(joystick_layout)
self.joystick = joystick
elif not self.joystick:
I've been attempting to configure ds4drv, but have hit a snag regarding hidraw/USB connectivity and the
'NoneType' object has no attribute '...'
Python exception. The exception occurs when attempting to switch away from either of themame
orsnes
profiles. I've tried updating to the current development version of ds4drv, as well as performing a bit of debugging myself: tryingemulate-xpad = false
in the two profiles on the supposition it may have been carried over from the xpad profile, and going so far as to modifyactions/input.py
in an attempt to bypass the thrown exception - to no avail. Please see the relevant details below.Linux atla 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
ds4drv >/tmp/ds4drv.log 2>&1