Python camera.rotation_euler problem I cannot figure out why the following line of code throws the error "AttributeError: 'NoneType' object has no attribute 'rotation_euler'"

bpy.context.scene.camera.rotation_euler =(0,0,0)
If the camera exist but this is NOT set; then you get the error



you must set the camera