Hey Justin,
Thanks for the reply.
Yes, I ended up doing some command call like that, but i was very curious about
what was the 'Maya command error' about, and how to set that 'time' attribute.
Another thing that i noticed, is that you get different data depending how you query,
for example
import maya.cmds as mc
# createa a sphere and set a keyframe
sphere = mc.polySphere()[0]
mc.setAttr(sphere+'.r', 17,17,17)
mc.setKeyframe()
# get animation curve
crv = mc.listConnections(sphere+'.ry')[0] # rotation curve this time
# query values for key 0
time0, value0 = mc.getAttr(crv+'.keyTimeValue[0]')[0]
value1 = mc.getAttr(crv+'.keyTimeValue[0].keyValue') # same keyframe as before
print value0, value1, value0 == value1 # value0 is in radians and value1 is in degrees
>>> 0.296705972839 17.0 False
So if you want the values that you see in the graph editor, you have to be careful how you query.
Cheers!
Eduardo