Can't add keyframes properly
In the Animation layout there is a "Dope Sheet" and summary. I resolved this problem by unchecking the lock icon.



This was my error:


  RuntimeError: Error: F-Curve with path 'scale[2]' cannot be keyframed, ensure that it is not locked or sampled, and try removing F-Modifiers


After turning the lock icon off it works!