Klipper / printer.cfg empty after reboot

#1

hello, i ve the problem, that my printer.cfg (0kb) is empty if i reboot my system.
something delete all in the file...

https://www.bilder-upload.eu/bild-d4b1a9-1554410332.png.html

#2

The printer.cfg file isn't related to OctoPrint. Obviously, it's a Klipper configuration file. Hopefully you have a backup of this file that you can re-use.

Their documentation suggests that the file needs to be located in the home directory of the pi user: /home/pi/printer.cfg. OctoPrint doesn't delete any files there after rebooting nor does anything that was added with the OctoPi image.

You could look at the /tmp/klippy.log to see if there is anything that might help but I doubt it.

Is it possible that you tried to nano the file in place, edited it and then didn't save it?

#3

hello, i ve a backup. seems that the problem is the octoklipper plugin and/or the
rights for the printer.cfg

if i change the rigths to 666, something delete all entries in my file.

#4

I think I know who could be deleting your file.

Like I said, OctoPrint itself won't delete the file. Searching the octoklipper respository for printer.cfg turns up this file.

# And then on line 89 the fun begins:
# It overwrites the file's entire contents with whatever is in data["config"].
# So if that is empty, you end up with an empty file.

on_settings_save() likely fires off when you click the Save button on the Settings page, I'd guess. But if there are JavaScript-related errors before this point, then all scripting might have stopped which would result in that variable holding nothing.

Take all this to the author's repository, open an issue and let him/her work with you for a resolution.

#5

ok, found this here

seems that is a big bug.
in the future i use ssh (nano) to config my file.