No Belt Tension Graphs
Today I updated RatOS, and since then I no longer get belt tension graphs. In the console, an error message appears: SUDO_USER: unbound variable. The shaper graphs still work. Does anyone have an idea?
43 Replies
the same happens to me!: /home/pi/ratos-configurator/configuration/scripts/environment.sh: line 7: SUDO_USER: unbound variable
same here any Solution ?
@miklschmidt I think that there is an error in the script:
generate-belt-tension-graph.sh
I think we have to comment the second line:
set -e -u -> #set -e -u
That'll just prevent it from breaking, there's an actual bug here it seems, gimme a sec!
Ah right of course, it's the -u
Fix pushed 👍 will be ready to update in 5 minutes 🙂
The unbound variable went away, but unfortunately no graph is being generated.
without the set -e it works! But if it not works with "-e", I think that it means that there is a command in the script that exit unsuccesfully...
any errors?
it should keep the -e, that's what makes it exit on errors.
-u is what makes it fail on unbound variables (the SUDO_USER is used in a check to see what user ran the script via sudo, it has fallbacks if it's not set)
I can't try now, but I'm shure that without set -e the script works correctly. It's weird! I agree with you about the funcion of "set -e": if it exit with "set -e" does it mean that there is something wrong! but the weird part is that If we don't put "set -e" th script do what is expected to do 🙂
Yes because it will just continue when something exits when it's not supposed to.
Please run it as it is now, with
set -u
(obviously update first), and tell me what happens when you run it.It not generates the graph.
What's not generated exactly? The data? the image in the console? is the file present in the input_shaper folder?
Are there any errors?
the file and the image in the console. no errors in the console
Show me the output please
better yet, post a debug-zip
nothing after that?
no nothing!
Please post a debug-zip
just a moment for the debug
try
set -eo pipefail
I tried with a reduced frequency range, but the result does not change. do you need the debug file?
(with "set -eo pipefail")
Last thing, try running the script manually:
If that shows nothing either, i'll remove the set line.
I have executed the script and it has generated the graphics file in /config/input_shaper
wat
no error!
So it works when you run it manually, but not when klipper runs it?
yes. bu it works also without "set -e"! it's weird!!
just a moment!
I have to check if the file was modified..
sorry! I removed the "set -e".
with set -e it fail! nothing is generated
Yeah it needs to be tested with
set -eo pipefail
from the commandlineI have tested also with set -eo pipefail. no output
from the commandline?
yes! shure! 😉
how about
set -xe
that'll log everything it does
please paste it here
I don't understand wtf is happeningAH! .. It's because the while loop reading out the env variables exits with a non-zero exit code when the file is done reading.. doh. Fix on the way 🙂
yes, it was clear that there was something that returned a non-zero value, the problem was to understand what generated that non-zero value! 🙂
chapeau!!
I downloaded the update and sadly I am still unable to generate a graph. Is this working for anyone else?
It still doesn't work for me either.
you have to wait a new update, or.... waiting the new update, you can comment the second line of the script... the one with "set -e". But I suggest you tu wait for the new update!
Telling people to comment out a line that stops the script if there is an error is a bad idea