Error when trying to stop print

Basic Information:
Printer Model: Creality K1 MAX
MCU / Printerboard: CR4CU220812S12_32_TMC2209_X2000E
MCU: chip: GD32F303RET6 version: CR4CU220812S12
klippy.log (3.6 MB)

When trying to stop the print either on the touchscreen or in fluidd after the print has started and while currently printing, it throws an error {“code”:“key165”, “msg”: "Error evaluating ‘gcode_macro M107:gcode’: jinja2.exceptions.UndefinedError: ‘dict object’ has no attribute ‘S’
", “values”: [“gcode_macro M107:gcode”, "jinja2.exceptions.UndefinedError: ‘dict object’ has no attribute ‘S’
"]}

when I look at the macro in fluidd it shows:
[gcode_macro M107]
gcode:
{% set fans = printer[“gcode_macro PRINTER_PARAM”].fans|int %}
{% if params.P is defined %}
{% if params.P|int < fans %}
SET_PIN PIN=fan{params.P|int} VALUE=0
{% else %}
SET_PIN PIN=fan0 VALUE=0
{% endif %}
{% else %}
SET_PIN PIN=fan0 VALUE=0
SET_PIN PIN=fan2 VALUE=0
{% endif %}

In the klippy log it shows:
[gcode_macro M107]
gcode =
{% set s = params.S|float %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber_fan TARGET={s}
{ action_respond_info(“Chamber fan target temperature: %s°C” % (s)) }
description = Set Chamber Temperature with slicers

My printer is rooted per Guilouz/GitHub instructions. I am at a loss as to the error and what I should change to fix the error for the attribute ‘S’, especially as in the config file it shows differently than on the klippy log.

TIA!!

Check your printer.cfg. There is the mentioned M107 with parameter S.
Seems to come after your known macro and overwrites it as it is processed later.

can’t find anything in printer.cfg file, no mention of m107 or any macros within that file.

no attribute s shows within the gcode macro.cfg file to even investigate or change, but it does show within the klippy log.

It is contained in the klippy.log so it must be in any of the included files.

@3DLimey

The klippy.log looks quite unusual.
Do you run on a not genuine Klipper system?

And why does Fluidd provide another M107 macro?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.