**System Information**
Operating system: Windows 10
Graphics card: RTX 3060
**Blender Version**
Broken: 3.1.2
Worked: Don't Know
**Short description of error**
When using Cyclic Cross option the subdivide operation expects an int but receives a float from the sqrt() operation above.
Changing line 2536 to have an int conversion on segments seems to fix the problem.
bpy.ops.curve.subdivide('INVOKE_REGION_WIN', number_cuts=int(segments))
**Exact steps for others to reproduce the error**
If you just add some annotation strokes in a circular array like in eye topology, create a surface and then check the "cyclic cross" checkbox you should get the error.