Daniel try using (try / except) for more debug or apply more verbose.
For it msg "execution of route type 1 with no name returned 1" use return -1 an
try again.
try:
# your code here
except Exception as e:
ksr.err(f"Exception occurred: {str(e)}")
return
regards
Richard