If the file code or comments contain Cyrillic, this creates a problem. For example, the file contains a material with a Cyrillic name; at 100% printing, because of this comment, the end_print macro does not work because the firmware goes into error
; filament_settings_id = "FDPlast TPU Веном"
if I fix name to english — all will work fine
; filament_settings_id = "FDPlast TPU venom"
Unhandled exception during run
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 217, in run
self.reactor.run()
File "/home/pi/klipper/klippy/reactor.py", line 292, in run
g_next.switch()
File "/home/pi/klipper/klippy/reactor.py", line 340, in _dispatch_loop
timeout = self._check_timers(eventtime, busy)
File "/home/pi/klipper/klippy/reactor.py", line 158, in _check_timers
t.waketime = waketime = t.callback(eventtime)
File "/home/pi/klipper/klippy/extras/virtual_sdcard.py", line 261, in work_handler
next_file_position = self.file_position + len(line.encode()) + 1
UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-42: ordinal not in range(128)
Transition to shutdown state: Unhandled exception during run
I turned off the setting on the second printer. I added a comment in Cyrillic as the second line in gcode and the second printer ignored it. The first one with the same comment went into error
Python 2 has no upstream support since 2020 (Sunsetting Python 2 | Python.org), and among other deficiencies does not handle unicode characters the same way as Python 3. I would recommend using a more recent version of Python for your Klipper install.