question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'NoneType' object has no attribute 'is_kernel_driver_active'

See original GitHub issue

Hi

I have a TongFang GM5MPHW. After installing your control center I was presented with this error :

Traceback (most recent call last): File "/usr/local/bin/aucc", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/aucc/main.py", line 86, in main control = ControlCenter(vendor_id=0x048d, product_id=0xce00) File "/usr/local/lib/python3.8/dist-packages/aucc/main.py", line 37, in __init__ super(ControlCenter, self).__init__(vendor_id, product_id) File "/usr/local/lib/python3.8/dist-packages/aucc/core/handler.py", line 50, in __init__ super(DeviceHandler, self).__init__(vendor_id, product_id) File "/usr/local/lib/python3.8/dist-packages/aucc/core/handler.py", line 16, in __init__ self._device = self._get_device(vendor_id, product_id) File "/usr/local/lib/python3.8/dist-packages/aucc/core/handler.py", line 27, in _get_device if device.is_kernel_driver_active(1): AttributeError: 'NoneType' object has no attribute 'is_kernel_driver_active'

Having checked hwinfo --short I get :

keyboard:  Integrated Technology Express ITE Device(8291)

Also checking lshw I get :

*-usb:1 UNCLAIMED description: Keyboard product: ITE Device(8291) vendor: ITE Tech. Inc. physical id: 6 bus info: usb@1:6 version: 0.03 capabilities: usb-2.00 configuration: maxpower=100mA speed=12Mbit/s

So it would appear that my keyboard is indeed compatible.

The answer lies in this error line :

control = ControlCenter(vendor_id=0x048d, product_id=0xce00)

Running lsusb shows :

Bus 001 Device 003: ID 048d:6004 Integrated Technology Express, Inc. ITE Device(8291)

Which as you can see has a different product id. Once I knew this I looked into the main.py file and found that the product id - 0xce00 is hardcoded, as soon as I changed this to 6004 then ran aucc -c green everything worked.

It would seem that there maybe a product id change for the manufacturer under the same product revision - which seems weird, but may account why other users might seem to have the correct hardware, but are getting this error.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
space-huntercommented, Dec 26, 2020

Device: Schenker NEO 15 Build: 2020/12 got the same error ‘AttributeError: ‘NoneType’ object has no attribute ‘is_kernel_driver_active’’ after changing the product_id and reinstall it works, thanks

lsusb | grep “Integrated Technology Express” Bus 001 Device 002: ID 048d:6004 Integrated Technology Express, Inc. ITE Device(8291)

old: control = ControlCenter(vendor_id=0x048d, product_id=0xce00) new control = ControlCenter(vendor_id=0x048d, product_id=0x6004)

1reaction
SimoFiuzcommented, Apr 29, 2021

Same issue here on an XMG CORE 14. My keyboard is just backlit with no RGB.

keyboard: /dev/input/event3 AT Translated Set 2 keyboard

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attribute Error 'NoneType' object has no attribute
The problem is here: Prep = print(re.sub(r" ?\([^)]+\)", "", result)). You're assigning the return value of print to Prep and then later ...
Read more >
[pyusb-users] beginners USB problem - The Mail Archive
bmAttributes) AttributeError: 'NoneType' object has no attribute 'bmAttributes' My vague understanding so far makes me think that I'm not ...
Read more >
AttributeError: 'NoneType' object has no attribute 'ema_scope'
AttributeError : 'NoneType' object has no attribute 'ema_scope'. I have the Automatic1111 webui do a git pull everytime I run it.
Read more >
'NoneType' object has no attribute 'lstrip'" failure message ...
Bugzilla · Improve "AttributeError: 'NoneType' object has no attribute 'lstrip'" failure message when node is incorrectly installed.
Read more >
"NoneType" error when draw Phyloxmltree - Google Groups
I use the following code to display the tree along with the internal branch labels. ... AttributeError: 'NoneType' object has no attribute 'width'....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found