Getting "cannot open file" error when trying to print

Basic Information:

Printer Model: Kingroon KP3s
MCU / Printerboard: Kingroon (GD32F303)
klippy.log
klippy.log (12.6 KB)

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed

Describe your issue: Newbie to Klipper and I’m going crazy! Finally have everything configured and running but cannot print. I can upload a gcode file, I can see it on the Mainsail dashboard, but when I click on it and then click “print” it returns an error saying “File cannot be opened”. Here’s what I’ve done so far;

I’ve changed the printer.vfg to:
[virtual_sdcard]
path: ~/home/pi/printer_data/gcodes

And the Mainsail config to:
[virtual_sdcard]
path: ~/home/pi/printer_data/gcodes

I can WinSCP into the directory on the Pi (home/pi/printer_data/gcodes) and see that the file has uploaded there successfully. However, I can’t print it! The test file prints fine on a Marlin printer.

The log file is mostly a mystery to me, but it doesn’t look like Klipper is looking where I’ve stored the file???

Thanks for any help – I need it :slight_smile:

You need to remove the tilde. In Linux a ~ is short for your home directory. So right now you have essentially specified /home/pi/home/pi/printer_data/gcodes

OK, did that. printer.cfg now includes
[virtual_sdcard]
path: home/pi/printer_data/gcodes

and

mainsail.cfg now inlcudes
[virtual_sdcard]
path: home/pi/printer_data/gcodes

I still get the same “cannot open file” error. Other ideas???

Now you are missing a / at the beginning. See @jakep_82’s answer → /home/pi/home/pi/printer_data/gcodes

Thanks!!! Errors I’d not have made if I actually knew what I was doing! I can now upload and start printing files, but I’ve a knew problem, so I’ll start a new post :slight_smile:

Hi,
Thanks by reading this I found my solution on it.
To avoid the trouble of giving the exact path to a file I made a link to it and from the web interface I did upload and print.
He is printing my second file now.
Hope this will be helpfull for somebody
greets