Broke PAM, not sure how...

Fresh install on RatOS 2.0, followed the instructions on the PAM site to install. @Helge Keck

Have in printer.cfg (near end)
[include pam/ratos.cfg]

Have in SuperSlicer start code (middle lines from Mikl, worked fine in the past)
MESH_CONFIG X0={first_layer_print_min[0]} Y0={first_layer_print_min[1]} X1={first_layer_print_max[0]} Y1={first_layer_print_max[1]}
M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode ruining our macro
M109 S0 ; Prevents prusaslicer from prepending m109 to the gcode ruining our macro
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]


Error from Klippy.log (wish I could clear this entire log to get only current info)
Internal error on command:"PAM"
Internal error on command:"_START_PRINT_BED_MESH"
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
    handler(gcmd)
  File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 186, 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 213, in run_script_from_command
    self._process_commands(script.split('\n'), need_ack=False)
  File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
    handler(gcmd)
  File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/pi/klipper/klippy/extras/pam.py", line 67, in cmd_PAM
    self.gcode.respond_raw('Relative Reference Index {0}'.format(str(reference_index)))
UnboundLocalError: local variable 'reference_index' referenced before assignment
MCU 'mcu' shutdown: Command request
Was this page helpful?