diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py index fb4c7d41..daf19db9 100644 --- a/klippy/extras/virtual_sdcard.py +++ b/klippy/extras/virtual_sdcard.py @@ -25,7 +25,7 @@ class VirtualSD: self.next_file_position = 0 self.work_timer = None # Error handling - gcode_macro = printer.load_object(config, 'gcode_macro') + gcode_macro = self.printer.load_object(config, 'gcode_macro') self.on_error_gcode = gcode_macro.load_template( config, 'on_error_gcode', '') # Register commands