Evaluate Curve: solver component. warning - Python script help

Hi all

I have tried to write some loops in Python components, and have succeded in getting it to work.
But I get a runtime warning “Evaluate Curve: solver component. warning: Parameter is outside the curve domain, results may be unpredictable”, the script works as it is, but I would like to know what I have done wrong, what can be improved. Could someone who is more knowledgable please take a look? I tried looking into reparameterizing my curve in the loop, from some old posts, but that resulted in change in the segment length subdivision, which is not wanted.

I am very new to python, but I have tried to explain all steps and inputs, so hopefully it makes sense.

If you need more information I have also written a more elaborate explanation of what I’m trying to achieve here:
Growing a polyline with fixed length segments along a curve

NB Alignment sub division - GH forum - solver_v3 excl tekla.gh (36.8 KB)