Closed staticanime closed 7 months ago
There should be a more complete error message in the klipper log, if you can find that it would be helpful, I'm not sure why it would throw any errors when it's all commented out, that's unusual.
Sorry, should have included that in the first place!! Here's the relevant snippet from the klippy.log, full log also attached.
Unhandled exception during connect
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect
self._read_config()
File "/home/pi/klipper/klippy/klippy.py", line 141, in _read_config
self.load_object(config, section_config.get_name(), None)
File "/home/pi/klipper/klippy/klippy.py", line 130, in load_object
self.objects[section] = init_func(config.getsection(section))
File "/home/pi/klipper/klippy/extras/virtual_leds.py", line 103, in load_config_prefix
return PrinterVirtualLeds(config)
File "/home/pi/klipper/klippy/extras/virtual_leds.py", line 42, in __init__
self.led_helper = pled.setup_helper(config, self.update_leds, sum(len(leds) for chainName, leds in self.configChains))
File "/home/pi/klipper/klippy/extras/virtual_leds.py", line 42, in <genexpr>
self.led_helper = pled.setup_helper(config, self.update_leds, sum(len(leds) for chainName, leds in self.configChains))
TypeError: object of type 'NoneType' has no len()
I've come back to give this another test, and I've concluded that this is the offender:
[virtual_leds chamber_leds] leds: neopixel:left_matchstick (1-10) neopixel:right_matchstick (1-10)
My assumption is that while led_effect allows you to stack multiple LED definitions, virtual_leds does not?
Thanks for the report, this is supposed to work, the code is mostly borrowed from led_effect. I'll look into it
this should be fixed now
Hi all
Getting this error when restarting klipper after attempting to add a virtual_leds definition to my LED config file (unused by any macros yet)
Here's the config I have, with the virtual_leds currently commented out to keep klipper functional
Full config file is auto-backed up to my github, so you can view it here, as well as the rest of my configuration, in case that is of any help