Hi all.
A bug or a mistake?
When I do these:
SAVE_VARIABLE VARIABLE=bed_t VALUE={printer.heater_bed.target}
SAVE_VARIABLE VARIABLE=noz_t VALUE={printer.extruder.target}
they work perfectly and save to disk. Moreover An M118 {printer.print_stats.filename}
also gives the correct filename which is “deneme.gcode”. Nothing fancy about the file name, no whitespace, etc. But when I do
SAVE_VARIABLE VARIABLE=fname VALUE={printer.print_stats.filename}
this gives an internal error requiring a firmware restart.
Relevant klippy error log is here:
Internal error on command:“SAVE_VARIABLE”
Internal error on command:“POFF”
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
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
func = lambda params: origfunc(self._get_extended_params(params))
File “/home/pi/klipper/klippy/extras/save_variables.py”, line 39, in cmd_SAVE_VARIABLE
value = ast.literal_eval(value)
File “/usr/lib/python2.7/ast.py”, line 49, in literal_eval
node_or_string = parse(node_or_string, mode=‘eval’)
File “/usr/lib/python2.7/ast.py”, line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File “<unknown>”, line 0
^
SyntaxError: unexpected EOF while parsing
Internal error on command:“POFF”