Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
I have sliced a print using the the Mosaic Canvas3d.io slicer - as PrusaSlicer with p2pp will halt my palette when print begins (It will not procide filament when pulled from the buffer).
During the print (after ~1hour) an exception occurs and klipper occurs:
Sending current ping info O31 D46beead2
Unhandled exception during run
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 217, in run
self.reactor.run()
File "/home/pi/klipper/klippy/reactor.py", line 292, in run
g_next.switch()
File "/home/pi/klipper/klippy/reactor.py", line 340, in _dispatch_loop
timeout = self._check_timers(eventtime, busy)
File "/home/pi/klipper/klippy/reactor.py", line 158, in _check_timers
t.waketime = waketime = t.callback(eventtime)
File "/home/pi/klipper/klippy/extras/palette2.py", line 578, in _run_Read
self.p2cmd(text_line)
File "/home/pi/klipper/klippy/extras/palette2.py", line 519, in p2cmd
func(params)
File "/home/pi/klipper/klippy/extras/palette2.py", line 382, in p2cmd_O34
percent = float(params[1][1:])
ValueError: invalid literal for float(): 0.-1
Transition to shutdown state: Unhandled exception during run
Drop that files into your ~/klipper/klippy/extras folder and replace the existing palette2.py.
I added a conversion check to make sure the value in the param is a legit float, if not it’ll make it a “NaN” as a default value.
Hopefully that more gracefully deals with it and doesn’t just die on you. I added right above that a new logging output to say when the an invalid parameter was fed into that p2cmd so maybe later we can see if it happens a lot.
I am just a user of klipper and palette2s. I have followed the documentation and it has been working for a long time.
Lately (after updating klipper etc), I have experienced these crashes during print.
To me it looks like the palette2s module are not correctly parsing/handling the Omega code O31 response. To my understanding, this is a ping - correct?
I have had some issues with my palette2s, but it turned out some compatibility problems with p2pp and prusaslicer. It would somehow overload/crash the palette during filament loading.
Switching back to canvas3d.io fixed the problem - for now at least.
He wrote it in 2021, not sure if he’s still active or actively maintains it.
As for my fix, I simply tried to handle the error more gracefully than what happened above. I did a cursory Google on how the palette2 works but it has a lot going on behind the scenes and I don’t have one to test with so that killed my chances of trying to go any further.