Hi Thomas,
Your code seems to work fine and sets the knot vector correctly for the b-spline curve.
However, the display field of double series attributes in feature definitions has a small bug. So to see the values of the knotVector doubleseries you can drag and drop the "knotVector" into the console field and press enter.
Cheers,
Hedi