#[FIXED] Prep crahes klipper

1 messages · Page 1 of 1 (latest)

rugged onyx
#

How?

#

loads na prepps fine

#

but if i press the buttion klipper just crashes

vernal tide
#
Internal error on command:"BT_PREP"
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/gcode.py", line 211, in _process_commands
    handler(gcmd)
  File "/home/pi/klipper/klippy/gcode.py", line 137, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 189, in cmd
    self.template.run_gcode_from_command(kwparams)
  File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 68, in run_gcode_from_command
    self.gcode.run_script_from_command(self.render(context))
  File "/home/pi/klipper/klippy/gcode.py", line 226, in run_script_from_command
    self._process_commands(script.split('\n'), need_ack=False)
  File "/home/pi/klipper/klippy/gcode.py", line 211, in _process_commands
    handler(gcmd)
  File "/home/pi/klipper/klippy/gcode.py", line 137, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/pi/klipper/klippy/extras/AFC_prep.py", line 33, in PREP
    self.gcode.register_command(self.AFC.AFC_RENAME_RESUME_NAME, prev_cmd, desc=pdesc)
  File "/home/pi/klipper/klippy/gcode.py", line 133, in register_command
    raise self.printer.config_error(
configparser.Error: gcode command _AFC_RENAMED_RESUME_ already registered
MCU 'EBBCan' shutdown: Command request```
maiden cedar
#

ah I see, I guess I didn't test running PREP more than once in a reboot of klipper

#

I can put in a fix for this

rugged onyx
#

i thought it was me again. thanks for the help

maiden cedar
#

for now just don't call prep after you reboot klipper

formal remnant
#

trying to rename and registering the command twice might be a problem I guessheh

maiden cedar
#

Yup just need to put in an update for it

maiden cedar
#

@rugged onyx Fix for this has been implemented in main, please update to get the changes

rugged onyx
#

fix works fine