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

Can't get it to work, dependencies are installed #5

Open
Razer0123 opened this issue Nov 4, 2019 · 2 comments
Open

Can't get it to work, dependencies are installed #5

Razer0123 opened this issue Nov 4, 2019 · 2 comments

Comments

@Razer0123
Copy link

Razer0123 commented Nov 4, 2019

Tried to run the example command to make c red, this is what i get

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/alessandro/Scrivania/fdclct-master/drevo/__main__.py", line 57, in <module>
    main()
  File "/home/alessandro/Scrivania/fdclct-master/drevo/__main__.py", line 34, in main
    lightctl = keylights.Keylights()
  File "/home/alessandro/Scrivania/fdclct-master/drevo/keylights.py", line 28, in __init__
    self.adapter = usblinux.Usblinux()
  File "/home/alessandro/Scrivania/fdclct-master/drevo/usblinux.py", line 17, in __init__
    "Keyboard not present or insufficient permissions")
ValueError: Keyboard not present or insufficient permissions
Exception ignored in: <bound method Usblinux.__del__ of <drevo.usblinux.Usblinux object at 0x7f76fc83bf60>>
Traceback (most recent call last):
  File "/home/alessandro/Scrivania/fdclct-master/drevo/usblinux.py", line 49, in __del__
    usb.util.dispose_resources(self.dev)
AttributeError: 'Usblinux' object has no attribute 'dev'
@userx14
Copy link

userx14 commented Nov 5, 2019

I'm not the author of this repo, but according to the error message you get, the code fails because dev is none (the search for the usb device was not sucessful) in this part of the code:

https://github.com/FxPape/fdclct/blob/f0b0799cea76f7c0d402f3dd514dc3a4a85089c8/drevo/usblinux.py#L10

The script tries to find the usb device with a specific vendor and device id and does not suceed in doing so.

Have you started the script with root priviledges or added an udev rule so that the script has access to the usb device?

Can you verfiy that the command lsusb reports a device with id's 0x0483 for vendor, and 0x4010 for product if you have the keyboard connected?

@dnettoRaw
Copy link

same here
wen i run lsusb i can't see any a device with id's 0x0483 for vendor, and 0x4010 for product

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

3 participants