! Error evaluating 'gcode_macro M600:gcode': jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'extrude'

Basic Information:

Printer Model: Modified Ender 3 v2
MCU / Printerboard: Manta E3 EZ
Host / SBC: BTT CB1
klippy.log: Attached

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered t
klippy.log (111.8 KB)
here

Describe your issue:

I’ve recently rebuilt my old Ender 3 v2, with a Manta E3 EZ board. I’m on the last step before I feel it’s in a usable state, and that’s an M600 macro. I have one working on my K1 Max which I want to adapt and use on the Ender, but I’m struggling with one error when I try to engage the macro for testing.

!! Error evaluating ‘gcode_macro M600:gcode’: jinja2.exceptions.UndefinedError: ‘dict object’ has no attribute ‘extrude’

I’m trying to see where I need to make the change, but I’m lost.

I’ve tested all the other macros, (_purge_more, pause, resume, cancel, load and unload) and they work.

The reason I want to adapt this M600 is because it present a nice menu to load, unload, purge more, cancel and resume. It auto-unloads once called, and moves the toolhead to a safe spot for the purge.

Any help is greatly appreciated.

Probably this line:

{% set E = printer["gcode_macro PAUSE"].extrude|float %}

You are trying to access the variable extrude in the PAUSE macro, but it does not exist there.

That was it. Thank you! Completely missed that. Everything is working beautifully now!