rootiest / zippy-klipper_config

Zippy Klipper Config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]

Engineer997 opened this issue · comments

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

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

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