joycond-cemuhook icon indicating copy to clipboard operation
joycond-cemuhook copied to clipboard

joycons motion

Open Slavajun1417 opened this issue 3 years ago • 1 comments

`Task exception was never retrieved future: <Task finished coro=<SwitchDevice._handle_events() done, defined at joycond-cemuhook.py:227> exception=ValueError('Invalid file descriptor: -1')> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 84, in anext future.set_result(next(self.current_batch)) StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "joycond-cemuhook.py", line 230, in _handle_events async for event in self.device.async_read_loop(): File "/usr/lib/python3.7/asyncio/coroutines.py", line 120, in coro res = func(*args, **kw) File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 92, in anext self.device.async_read().add_done_callback(next_batch_ready) File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 42, in async_read self._do_when_readable(lambda: self._set_result(future, self.read)) File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 18, in _do_when_readable loop.add_reader(self.fileno(), ready) File "/usr/lib/python3.7/asyncio/selector_events.py", line 324, in add_reader return self._add_reader(fd, callback, *args) File "/usr/lib/python3.7/asyncio/selector_events.py", line 251, in _add_reader key = self._selector.get_key(fd) File "/usr/lib/python3.7/selectors.py", line 190, in get_key return mapping[fileobj] File "/usr/lib/python3.7/selectors.py", line 71, in getitem fd = self._selector._fileobj_lookup(fileobj) File "/usr/lib/python3.7/selectors.py", line 225, in _fileobj_lookup return _fileobj_to_fd(fileobj) File "/usr/lib/python3.7/selectors.py", line 42, in _fileobj_to_fd raise ValueError("Invalid file descriptor: {}".format(fd)) ValueError: Invalid file descriptor: -1

future: <Task finished coro=<SwitchDevice._handle_motion_events() done, defined at joycond-cemuhook.py:199> exception=AttributeError("'InputDevice' object has no attribute 'absinfo'")> Traceback (most recent call last): File "joycond-cemuhook.py", line 210, in _handle_motion_events axis = self.motion_device.absinfo(event.code) AttributeError: 'InputDevice' object has no attribute 'absinfo' `

Slavajun1417 avatar May 27 '21 06:05 Slavajun1417

The line AttributeError: 'InputDevice' object has no attribute 'absinfo' suggests the version of your evdev module is too old. InputDevice.absinfo() was introduced in version 1.3.0, so try to update to the latest version and then test whether the issue persists.

gal20 avatar May 29 '21 12:05 gal20