It’s a simple function intended to convert integers stored as strings into proper integers.
It’s been working well, but for no apparent reason, it’s now not working. I’ve tried resetting the script editor and restarting Rhino, but it hasn’t helped.
That is because a string that contains other characters than can be converted from, say a string starting with “Freigh” will throw the ValueError like you are seeing. The message you get is for that ValueError. With the value given for the input variable you should see the function return on line 83.