Skip to content
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

joycons motion #50

Open
Slavajun1417 opened this issue May 27, 2021 · 1 comment
Open

joycons motion #50

Slavajun1417 opened this issue May 27, 2021 · 1 comment

Comments

@Slavajun1417
Copy link

`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'
`

@gal20
Copy link
Contributor

gal20 commented May 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants