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

Does not work on WSL2 #13

Open
genna87 opened this issue Jul 28, 2023 · 3 comments
Open

Does not work on WSL2 #13

genna87 opened this issue Jul 28, 2023 · 3 comments

Comments

@genna87
Copy link

genna87 commented Jul 28, 2023

I'm trying to run it on WSL2.

This command gives me an unexpected error.

$ dtv2change -kbd white

Traceback (most recent call last):
  File "/home/user/.local/bin/dtv2change", line 179, in <module>
    change.apply_changes()
  File "/home/user/.local/bin/dtv2change", line 81, in apply_changes
    self.clavier.key_set(self.dico_touches)
  File "/home/user/.local/lib/python3.10/site-packages/dtv2/dtv2.py", line 435, in key_set
    self.__key_set(id_keys, rgb_colors)
  File "/home/user/.local/lib/python3.10/site-packages/dtv2/dtv2.py", line 405, in __key_set
    self.__apply_packets(packets)
  File "/home/user/.local/lib/python3.10/site-packages/dtv2/dtv2.py", line 275, in __apply_packets
    a = self.__write_device()
  File "/home/user/.local/lib/python3.10/site-packages/dtv2/dtv2.py", line 207, in __write_device
    a = self.dev.write(self.packet)
AttributeError: 'NoneType' object has no attribute 'write'
@cobacdavid
Copy link
Owner

Can you test those python3 lines in your Python console:

>>> import hid
>>> hid.enumerate(0x416, 0xa0f8)

@genna87
Copy link
Author

genna87 commented Jul 31, 2023

Empty array:

[]

@cobacdavid
Copy link
Owner

cobacdavid commented Jul 31, 2023

It seems the keyboard is not detected. Actually I do not know how WSL2 does to make USB devices available...

Edit: Maybe use this method to enable the device.

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