HELP: Klipper Error after printer switched off (without shutdown)
Hi, one of my kids decided is a good idea to switch off the printer after it has finished a print job. Just he didn't use the shutdown in Mainsail, but the actual power switch.
Right now the error I am fighting is: "Internal error during connect: unexpected EOF while parsing (<unknown>, line 0)"
klippy.log stored this:
Unhandled exception during connect
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect
self._read_config()
File "/home/pi/klipper/klippy/klippy.py", line 141, in _read_config
self.load_object(config, section_config.get_name(), None)
File "/home/pi/klipper/klippy/klippy.py", line 130, in load_object
self.objects[section] = init_func(config.getsection(section))
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 191, in load_config_prefix
return GCodeMacro(config)
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 148, in init
config.get(option))
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 Do you guys know what shall I do?
^ SyntaxError: unexpected EOF while parsing Do you guys know what shall I do?
11 Replies
go to your 'machine' menu ...see if there is a printer.cfg file, and the flie size id above 1K in size. If not, you need to rename one of the backup files back to printer.cfg. I just went through this myself, albeit NOT from a power shut-down. (...turned on my machine and printer.cfg file was blank! < .1K in size)
Top of your listing of files is a gear itcon...might need to turn on hidden files or backups to see old cfg backups
The printer.cfg was just fine. I decided to switch to RatOS 2. Now I wonder how much similar the two printer.cfg files are (RatOS 1 vs. 2)...😱
Anyway, I have to give up for today, will continue tomorrow
They're incompatible, so you can only transfer the values, you cannot just use your old config
Well, I guess the pins on the Octopus and EBB36 stayed the same. And that the Klipper vars also didn't change But yeah, it will probably require quite some effort to move to RatOS 2
shouldn't be too bad, you've done it before. Just reference your old config, make sure the values are the same, that you're including the same hardware files and copy over your USER OVERRIDES and you should be good to go.
Shouldn't take you more than a couple of minutes
@miklschmidt nenene....not so fast (as I thought!) Because my EBB36 is connected via U2C over CAN 😦
So I'll probably have to go back to RatOS 1 if no one has a fast trick to get 2.0 running over CAN 😦
Throw out the U2C
Plug in a USB.
Just don't use CAN
Easy fix
Or waste time setting up CAN again. RatOS 2 doesn't stop you. Same process as 1. There is no difference, only you can use all the includes now, just replace the MCU serial with CAN.
I need to get my printer back up an running...fast. And I don't have a long usb cable, plus not time (and no printer to make new shelf, cable relief etc)
Do you still have your ratos 1.x printer.cfg file? Like Mikel and I said - you should be able to copy the overrides you did before to get CAN working on ratos 2.x
Yeah i don't know why we're arguing, there's no difference if you go with v1 or v2.
thanks @blacksmithforlife and @miklschmidt . I managed to get it up and running, but only after making and flashing klipper manually on the EBB36. In the process, I decided to try out the 500000 CAN Bus speed (used 250000 before) because some users reported better shaper graphs.
So yeah, next is to design some shelf with a USB slot in it and probably move on to USB. Is indeed easier to setup than CAN, but I do not have such a long USB cable around and needed my printer to be able to print today.