Valid Index but value not found I'm currently trying to access the skin modifier's radius variables in a program I am making which uses this line of code:

bpy.data.objects["Plane"].data.skin_vertices[0].data[0].radius


It comes out with the error:

RuntimeError: bpy_prop_collection[index]: internal error, valid index 0 given in 4 sized collection, but value not found


Any ideas how I can fix this?
I have found the answer, The reason for this error is because the data linked to the skin modifier is locked when using edit mode. Simply setting it to object mode unlocked the variables.
Hopefully this helps anyone who was as confused as I was.