Unable to open file when trying to print

Basic Information:

Printer Model: Ender 3 V2 Neo
MCU / Printerboard: BTT SKR 1.4 Turbo
klippy.log (829.2 KB)


Describe your issue:

I’ve been using Klipper for about a year, so have reasonable experience. Over the weekend I switched from using RPi’s to use a Thinclient with RPi for desktops installed. Used Kiauh to setup multi printer install. Although I only have 2 printers I installed for 4, just in case, you know I accidentally clicked on buy for another :wink:

Anyway, everything went well. The second printer the Neptune 3 is working well & printing. The one in concern the Ender 3 V2 Neo responds to all commands & talks to Klipper etc. When I try to print though, I get “unable to open file” That’s it, no other information. I downloaded the Klippy log & it seems to point to a problem in the virtual_sdcard.py file. The paths are all correct, get no warnings regarding that. I can upload files from Prusa Slicer & manually through Mainsail. I can delete files too. I have tried the “sudo chmod 777 xxxxxxx” fix with no results. You can read it for yourself but for expediance this seems to be the issue:

Traceback (most recent call last):
File “/home/ant/klipper/klippy/extras/virtual_sdcard.py”, line 178, in _load_file
fname = files_by_lower[fname.lower()]
KeyError: ‘all-digits-and-front-frame.gcode’

Does anybody have a clue what might be going? Been Googling all afternoon & reading posts on here but still no luck in finding answer.

Are you sure about your gcode path? The rest of your paths would rather suggest a path:


Yes, that is the path I am using. On the machine with issues it’s /home/ant/E3V2Neo_data/gcodes & on the other set up at the same time it’s /home/ant/Neptune3_data/gcodes but why that one works & the other doesn’t I am at a loss to explain.

Just in case it was something stupid I tried taking the full path name & using the Tilde instead. However if I format it as ~/E3V2Neo_data/gcodes I get a Moonraker warning telling me the path does not meet expected location as in this screenshot:

This is what you have in your config:

path = ~/printer_data/gcodes
on_error_gcode = CANCEL_PRINT

likely, you want to use:

path = /home/ant/E3V2Neo_data/gcodes
on_error_gcode = CANCEL_PRINT

Did you ever tried a fresh SDCard?

Good luck, hcet14

I don’t use SD Cards. I upload straight from Prusa Slicer.

Sorry if I am being extra dense at the moment. Wouldn’t suprise me these days! but my printer.cfg does already have as you suggested.

Your log states otherwise.
Are you sure you are working with the correct printer.cfg? It should be:

Yes I am sure. I just double checked by logging in via WinSCP & took a screenshot of the printer.cfg in question.

Then check ALL your “includes” if you have the same section overriding your initial definition.

…allow me to chime in for trying to clarify sth here (OP and I are friends and talked about it via email already), btw I use the pretty much same setup:
In the printer.cfg of OP the path is set correctly (/home/ant/E3V2Neo_data/config/printer.cfg) - but in the mainsail.cfg it’s the default ~/printer_data/gcodes.
Now since [include mainsail.cfg] is set in the printer.cfg as well, it seems like klippy.log takes/reports the path from the called mainsail.cfg.
Since mainsail.cfg is read-only, the path there can’t be changed.

Question here (from my side) would be now if Klipper somehow takes the path from mainsail.cfg instead of the one being set in the printer.cfg.

As mentioned, I have pretty much the same setup as well, and even tho I call [include mainsail.cfg] (with the deafult path in there) as well and still have a different path being set in the printer.cfg, Klipper doesn’t complain (what I’d actually have expected to happen).

I just tried uploading a file to each of my printers and each one is being stored in the belonging folder (~/printer_1_data/gcodes and ~/printer_2_data/gcodes, so it seems to work despite the fact that [include mainsail.cfg] with the default “wrong” path is being called as well) - I didn’t try to print yet though (we’re just setting up our T630s for running multiple instances&machines)…

1 Like

It is quite simple: The later definition of the same section is taking precedence without any comment.

Ooohhh, that’s good to know!
So just to make sure that I get it right (sorry, non-native speaker here :wink: ): if I call [include mainsail.cfg] with the default path (the wrong one) before my [virtual_sdcard], then everything is fine and the correct path will be taken.
Now since OP calls the [include mainsail.cfg] after his [virtual_sdcard], the wrong path is being taken.
Is that correct?
If so, OP has to just rearrange those entries then - right?

Correct. Or simply copy the mainsail.cfg into your config folder and make it RW

1 Like

Ha, thanks!!!

Dammit - I never thought about copying it to config folder to make it RW :see_no_evil: :laughing:
Thanks for mentioning that!

OK since talking with Catnippr & he transalted what was being said to something I can understand. I have moved the include files section to ABOVE where the virtual SD card path is set. & that seems to have fixed the issue. The odd thing I can’t make out is the Neptune 3 is set up the same way but just works :person_shrugging: Anyway, thank-you for your help.

Glad it’s working now and odd that it doesn’t cause issues at the N3+, but maybe change it there accordingly, just to make sure it’s set how it’s supposed to be.
Btw, maybe better add on_error_gcode: CANCEL_PRINT underneath the path: ... in the [virtual_sdcard] section as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.