Once printing is complete, Klipper turns off

Basic Information:

Printer Model: Sapphire Pro
MCU / Printerboard: stm32f103xe
klippy.zip (1.3 MB)

Describe your issue:

Once printing is complete, Klipper turns off.
The log says “UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 23-27: ordinal not in range(128)”. At the end of the G code file there are comments in Cyrillic. After removing these comments from the G code, printing completes correctly.

This is a known issue.

Upgrade to Python 3 and if the problem persists then please post a new klippy.log and the relevant gcode file.