Vector component in Python cannot exceed 10 radians I'm using this python code to rotate a bone in the blender game engine, the code works fine until bone angle reaches 10.0 or -10.0 radians then it stops

import bge
import mathutils

cont = bge.logic.getCurrentController()
armature = cont.owner

up_pressed = cont.sensors['up_sensor'].positive
down_pressed = cont.sensors['down_sensor'].positive
currentAngle = armature.channels['Bone'].rotation_euler 

speed = 0.1
increment = mathutils.Vector((0.0, speed, 0.0))

if up_pressed:
    armature.channels['Bone'].rotation_mode = bge.logic.ROT_MODE_XYZ
    armature.channels['Bone'].rotation_euler  = currentAngle + increment
    armature.update()

if down_pressed:
    armature.channels['Bone'].rotation_mode = bge.logic.ROT_MODE_XYZ
    armature.channels['Bone'].rotation_euler  = currentAngle - increment
    armature.update()    

print(currentAngle)


I guess it has something to do with the mathutils.Vector type but I can't figure it out.

is there another way to handle .rotation_euler data other than vectors?
I think the easy answer is just replace your actual rotation statements with an if statement that says something like the following:

up_pressed:

if armature.channels['Bone'].rotation_euler.y &lt; 2*math.pi:
    armature.channels['Bone'].rotation_euler.y = currentAngle + increment
else:
    armature.channels['Bone'].rotation_euler.y = 0


down_pressed:

if armature.channels['Bone'].rotation_euler.y &gt; 0:
    armature.channels['Bone'].rotation_euler.y = currentAngle - increment
else:
    armature.channels['Bone'].rotation_euler.y = 2*math.pi