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

OSError: read error #7

Open
RhysFonville opened this issue Oct 22, 2022 · 3 comments
Open

OSError: read error #7

RhysFonville opened this issue Oct 22, 2022 · 3 comments

Comments

@RhysFonville
Copy link

RhysFonville commented Oct 22, 2022

When running the example.py file, I first have to change line 8 from
found_sub = KeyboardHelper.get_subdevice(0x951, 0x16e5, 1)
to
found_sub = KeyboardHelper.get_subdevice(0x951, 0x16dd, 1)
to get the correct device (or at least for kb.connect() not to throw an error).

An error is then thrown at kb.start_thread(), giving me this error:

Exception in thread Thread-7 (__thread_loop):
Traceback (most recent call last):
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\site-packages\hyperx_keyboard_rgb\keyboard.py", line 78, in __thread_loop
    self.__send_feature_report(
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\site-packages\hyperx_keyboard_rgb\keyboard.py", line 90, in __send_feature_report
    read = self.hid.get_feature_report(0, 0x64)
  File "hid.pyx", line 346, in hid.device.get_feature_report
OSError: read error

I'm unsure if this is a problem with me changing the subdevice pid. I am not able to fix this.

@K4CZP3R
Copy link
Owner

K4CZP3R commented Oct 26, 2022

What happens when you try other interfaces?

@RhysFonville
Copy link
Author

What happens when you try other interfaces?

The two available interfaces for the keyboard's subdevices contain one 0, and four 1s. All throw the same error.

@RhysFonville
Copy link
Author

What happens when you try other interfaces?

Could it be a problem with how my keyboard is set up? Does it have to be in a certain state?

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