I’ll admit to being a new user of klipper. I have klipper installed, functioning and generally working well with my Prusa Mk3S+ printer. My issue seems to be my inability to get mainsail to tell klipper to execute the G-Code files I’ve saved to the Raspberry Pi in the correct ~/printer_data/gcodes directory. Mainsail states it’s unable to load the file. I’ve looked at both my mainsail.cfg and printer.cfg files and feel I have SDCard Path correctly set to "Path: ~/printer_data/gcodes. I even checked the user file permissions on the directory which appear correct.
I may easily be posting this message in the wrong location, for that in advance I’m sorry. Appreciate any constructive feedback in this regard. I’ve searched the internet and found it appears to be mainsail/klipper configuration issues only I’m not yet able to fix this. Have spent the last 3 days searching for answers. Feedback/assistance greatly appreciated.
The file uploads just fine to Mainsail (at least I can see it in the print dialogue box and used the “drag & drop” method to put it there. I’m guessing perhaps I need to recompile Klipper or mainsail or something, since as noted below I can find NO reference to the incorrect printer_datas/gcodes although do find it in the klippy log file… not sure if the top of the file is most recent or bottom of the file, however in either case I still am unable to get it to register.
Moonraker notes it is expecting a different path… only it’s configuration doesn’t seem to have any path information (may easily be me not understanding the configuration file and how to read/interpret)
I agree klippy log file shows the incorrect path, however I’m not understanding where it is getting that path information from… when I look at my printer.cfg file the SDCard reference is different. Do you know if I need to re-compile klipper or something? printer.cfg (17.8 KB)
Currently I assume if I reboot the pi it would restart both klipper and mainsail and use the saved configuration files…is this assumption correct?
This indicates that you are running Klipper under the user bappi.
As such the statement in your printer.cfg path: ~/printer_data/gcodes
would expand to path = /home/bappi/printer_data/gcodes.
Note that the ~ is just a shortcut to /home/<current user> in Linux
Your screenshot states that Klipper actually runs as user pi and has configured the path as: path = /home/pi/printer_data/gcode_files
but Moonraker expects: path = /home/pi/printer_data/gcode
Some pointers:
Clarify under which user you are actually running and make sure it is followed through everywhere. In doubt, start over and use KIAUH, which makes sure that the correct paths are used everywhere
Such a warning like in your screenshot also occurs if you modify [virtual_sdcard] path but do not restart Moonraker.
In a klippy.log always the end is the most recent entry.
The klippy.log is always right (simple truth in Klipper). It reflects the settings that Klipper got from the cfg files. If it is not what you expect, then you have to search for the issue in the configs / installation you are using
Also attach the file mainsail.cfg here, as it might contain conflicting information
The folder you are referencing must actually exist (it is not created automatically), otherwise such a message will be raised as well (of course exist under the correct user, whereas the user does not matter. pi is just the most common one, so often found in guides etc.)
Thanks, I agree and acknowledge your correctness on ~ just replacing the front portion of the path statement. I’ll make a backup copy of my printer.cfg file. I did use KIAUH to install moonraker/mainsail/klipper but perhaps messed something up along the way.
I didn’t know moon raker needed to be restarted… goes searching for how to do that… perhaps that is all my issue is.
My intent was for user pi, I’m not sure where the heck BAPI came from other than an error typing somewhere. Attached is my mainsail.cfg file
Perhaps a dumb question, but can I just re-run the KIAUH installer (after downloading my printer.cfg file) and it will overwrite files or am I better to rm the entire directory and start over?
Ok, I have good news only this leads to more questions. I suspect I failed to restart MoonRaker after configuration file changes such that they could take effect. When I restarted moon raker and rebooted the RPi the MoonRaker error message cleared.
Now I still don’t know why klipper is looking in the root klipper folder for GCode_Files, but if I create it and copy gcode here it works and allows the printer to print… well almost I got a movement out of range I need to figure out but it’s a step in the correct direction. When I look at the Klippy.log file I see it pointing to NOT the directory I want it to, only unsure how or what files to edit to get Klipper to actually use my intended ~/Printer_Data/Gcodes … more reading tomorrow.
The other great news is now my RPi camera also works…
Still wondering if I can just re-run KIAUH file to have it re-install the configuration files and have it point to the correct directory I want it to use… anyone have feedback on this…
I know my RPi is currently suffering from the By-ID bug, however if I read the correct web forum, in theory I may have fixed this. I think this was the only other sorta challenge to get klipper running the first time.
TBH, I’m not sure how KIAUH would handle this. There are multiple files involved, all across the Linux system, that contain path information. It requires some in-depth Linux knowledge to check and backtrack all of them.
The safest approach would be:
Your mainsail.cfg also includes a [virtual_sdcard] section. Working with includes is nice to keep things tidy but poses a high risk of creating unwanted effects. Klipper will take the last statement that it processes, i.e. in the sequence as given in the printer.cfg