rootiest / zippy-klipper_config

Zippy Klipper Config
GNU General Public License v3.0
371 stars 43 forks source link

[BUG] #12

Open Engineer997 opened 1 year ago

Engineer997 commented 1 year ago

When attempting to run the mostly stock command CHANGE_TOOL TOOL=1(or 2) I get this error sh: 0: cannot open ~/printer_data/config/tool_swap.sh: No such file

I changed the directory to /home/pi/ in place of ~/ and I get this error:

/home/pi/printer_data/config/tool_swap.sh: 37: [[: not found Error: Invalid input. Integer required.

So it looks like with /home/pi/ it can make it to the file but the tool_swap.sh code rejects the 1 and 2 stating they are not integers.

Commenting out the integer check in tool_swap.sh results in printer.cfg being erased.

I followed the instructions here: https://github.com/rootiest/zippy-klipper_config/tree/master/extras/tool_swap and I have made no adjustments to the code in swap_tools.cfg and tool_swap.sh but did add my tool configs to the tool1.cfg and tool2.cfg to prevent klipper errors. CHANGE_TOOL Command and results CHANGE_TOOL TOOL=2 Command and results swap_tools cfg Printer cfg

github-actions[bot] commented 1 year ago

Welcome Engineer997!\nCongrats on creating your first issue.\nPlease follow the issue template to help us resolve your issue quickly.

rootiest commented 5 months ago

The gcode_shell_command can be really problematic to use.

It's extremely picky about the syntax/formatting, and depending on your OS you may see different behavior/formatting preferred.

Try running the following:

chmod +x /home/pi/printer_data/config/tool_swap.sh

And then change the following lines:

command: sh ~/printer_data/config/tool_swap.sh 1
command: sh ~/printer_data/config/tool_swap.sh 2

to:

command: /home/pi/printer_data/config/tool_swap.sh 1
command: /home/pi/printer_data/config/tool_swap.sh 2

It may work better running that way.

I know this response is incredibly late, I apologize for that!

Please let me know if this helps, either here or you can reach me on Discord