moonraker icon indicating copy to clipboard operation
moonraker copied to clipboard

Print file with '#' in name

Open sharpner opened this issue 1 year ago • 2 comments

What happened

Uploading a file with # in the filename works, but it does not get a preview image, see the difference between the files:

image

Trying to print it anyways results in: image

After some testing I figured out that when the filename of the gcode contains the # special character, it won't work.

Client

Mainsail

Browser

Safari

How to reproduce

Upload a gcode file with # in the name. Can by via web interface or directly onto the host (I did it via samba share) does not matter.

Additional information

mainsail v2.12.0 moonraker v0.9.2-0-gb40751ba

sharpner avatar Jul 31 '24 09:07 sharpner

Hi. It appears you have two different issues, however I don't believe that either is specific to a bug in Moonraker.

With regard to the missing image, I can only speculate without a log, but I suspect the frontend is not properly escaping the # when requesting the image.

The larger issue, which likely makes the image problem moot, is that Klipper cannot accept a # as part of a gcode command parameter. Thus, when Moonraker attempts to run SDCARD_PRINT_FILE FILENAME=..., you get the malformed command error.

Arksine avatar Jul 31 '24 19:07 Arksine

Hey, thanks for the answer!

Makes sense, I would already be happy if the frontend would let me know that # is not allowed when uploading an image - took me too long to find the error

sharpner avatar Jul 31 '24 19:07 sharpner

I believe that this may be resolved in Klipper, so I am going to close this.

Arksine avatar Jan 20 '25 12:01 Arksine