# "GCode path received from Klipper does not match expected path"

**URL:** <https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513>\
**Category:** General Discussion\
**Created:** [October 16, 2022, 4:42pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513 "2022-10-16T16:42:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadysaneto](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sadysaneto](https://klipper.discourse.group/u/sadysaneto)\
**Post date:** [October 16, 2022, 4:42pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/1 "2022-10-16T16:42:14Z")

</div>

### Basic Information:

Printer Model: ender3  
 MCU / Printerboard: gd32  
 `klippy.log`  
[klippy (1).log](https://klipper.discourse.group/uploads/short-url/p3oiTJvn4Ne77eWlOJgp748d4SP.log) (411.1 KB)

### Describe your issue: finally managed to flash klipper, now ive got this error

- GCode path received from Klipper does not match expected path: /home/sady/printer\_data/gcodes

☹

any help?

---

<div class="post-metadata">

**Author:** ![NAPCAL](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/napcal/32/1794_2.png) [@NAPCAL](https://klipper.discourse.group/u/NAPCAL)\
**Post date:** [October 16, 2022, 7:18pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/2 "2022-10-16T19:18:51Z")

</div>

Your printer configuration file and I would guess where you are trying to send your gcode file doesn’t match your virtual SD card location.

Found in the last run in your log file.  
===== Config file =====  
[virtual\_sdcard]  
path = ~/gcode\_files

---

<div class="post-metadata">

**Author:** ![sadysaneto](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sadysaneto](https://klipper.discourse.group/u/sadysaneto)\
**Post date:** [October 16, 2022, 7:39pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/3 "2022-10-16T19:39:32Z")

</div>

yeah, ive noticed it.

klippy says: [virtual\_sdcard]  
path = /home/sady/gcode\_files  
on\_error\_gcode =  
CANCEL\_PRINT

moonraker says:

data\_path: /home/sady/printer\_data

there is no gcode\_files folder on my pi, but there is a printer\_data one.

Dont know what to do, im a super noob…

I guess i must match the name on the paths by editing the configs on winscp?

---

<div class="post-metadata">

**Author:** ![NAPCAL](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/napcal/32/1794_2.png) [@NAPCAL](https://klipper.discourse.group/u/NAPCAL)\
**Post date:** [October 16, 2022, 7:57pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/4 "2022-10-16T19:57:23Z")

</div>

If you are using KIAUH to install, there is an issue with it and installing Moonraker.

---

<div class="post-metadata">

**Author:** ![sadysaneto](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sadysaneto](https://klipper.discourse.group/u/sadysaneto)\
**Post date:** [October 16, 2022, 8:00pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/5 "2022-10-16T20:00:10Z")

</div>

yeah, ive used it ☹

---

<div class="post-metadata">

**Author:** ![Arksine](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Arksine](https://klipper.discourse.group/u/Arksine)\
**Post date:** [October 16, 2022, 8:27pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/6 "2022-10-16T20:27:21Z")

</div>

If this is a new install change the gcode path in printer.cfg:

```auto
[virtual_sdcard]
path: ~/printer_data/gcodes

```

Then restart klipper.

---

<div class="post-metadata">

**Author:** ![sadysaneto](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sadysaneto](https://klipper.discourse.group/u/sadysaneto)\
**Post date:** [October 16, 2022, 8:29pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/7 "2022-10-16T20:29:33Z")

</div>

i just reflashed it, i messed around a lot and prefer to do it over. But prolly will have to follow your tip, so thanks in advance

---

<div class="post-metadata">

**Author:** ![Arksine](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Arksine](https://klipper.discourse.group/u/Arksine)\
**Post date:** [October 16, 2022, 8:34pm UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/8 "2022-10-16T20:34:38Z")

</div>

Yeah, this is going to be a required step for new installs…the developer of KIAUH is working on an update.

This is a recent change in Moonraker. Previously Moonraker used the path Klipper defined. This is a security vulnerability…if someone untrusted gets access to the instance they can use Moonraker to modify the location of the gcode path and overwrite source code with something malicious. To prevent this Moonraker defines the location and Klipper must be configured to match it.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [October 26, 2024, 5:53am UTC](https://klipper.discourse.group/t/gcode-path-received-from-klipper-does-not-match-expected-path/4513/9 "2024-10-26T05:53:05Z")

</div>


