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

Startup Failure: AttributeError: 'NoneType' object has no attribute 'reset' #49

Open
jlong23 opened this issue Mar 10, 2021 · 1 comment

Comments

@jlong23
Copy link

jlong23 commented Mar 10, 2021

python ./run.py
initializing thermaltake rgb daemon
loading config
raw config file
** start **

controllers:

  • unit: 1
    type: g3
    devices:
    1: Riing Plus
    2: Riing Plus
    3: Riing Plus
    4: Floe Riing RGB
    fan_manager:
    model: locked_speed
    speed: 50
    lighting_manager:
    model: full
    r: 40
    g: 0
    b: 0

** end **

/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/daemon/config.py:61: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
return yaml.load(cfg)
[{'unit': 1, 'type': 'g3', 'devices': {1: 'Riing Plus', 2: 'Riing Plus', 3: 'Riing Plus', 4: 'Floe Riing RGB'}}]
{'model': 'locked_speed', 'speed': 50}
{'model': 'full', 'r': 40, 'g': 0, 'b': 0}
creating fan manager
creating FanManager object: [model: locked speed 50%]
creating lighting manager
initializing FullLightingEffect light controller
configuring controllers
Traceback (most recent call last):
File "./run.py", line 21, in
main()
File "./run.py", line 13, in main
daemon = ThermaltakeDaemon()
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/daemon/daemon.py", line 50, in init
self.controllers[controller['unit']] = ThermaltakeController.factory(controller['type'], controller.get('unit'))
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/controllers.py", line 40, in factory
return subclass_dict.get(unit_type.lower())(unit=unit_identifier)
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/controllers.py", line 61, in init
super().init()
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/controllers.py", line 30, in init
self.init()
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/controllers.py", line 67, in init
self.driver = drivers.ThermaltakeG3ControllerDriver(self.unit)
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/drivers.py", line 34, in init
self._initialize_device()
File "/home/jlong/dev/linux_thermaltake_riing/linux_thermaltake_rgb/drivers.py", line 43, in _initialize_device
self.device.reset()
AttributeError: 'NoneType' object has no attribute 'reset'

@Phles
Copy link

Phles commented Aug 19, 2023

I encountered this same problem, did some digging and it appears that the USB device for the controller was not found.

def _initialize_device(self):
        self.device = usb.core.find(idVendor=self.vendor_id,
                                    idProduct=self.product_id)
        # fail safe incase last device usage was dirty
        self.device.reset()

        if self.device is None:
            raise ValueError('Device not found')

I am going to check if there are any USB connections to the controller I am missing.

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