Your raw code specified a Nurbs curve of order 3 (so polynomial degree
2, a quadratic curve), and set 5 control points. Since the 'knot'
attribute was not specified, I assume you relied on the default.
Does the code get the behavior you expect if you explicitly specify a
"knot" attribute ? ( for example:
knot = [0.0,0.0,0.0, 0.33, 0.67, 1.0, 1.0, 1.0] # note: length - 8 list