Rigidbody.objects_add.poll() failed!
You should deselect non mesh objects before adding rigid body objects

 bpy.ops.object.select_all(action='DESELECT') #clear selection
 candidate_list = [item.name for item in bpy.data.objects if item.type == "MESH"]
for object_name in candidate_list:
    bpy.data.objects[object_name].select = True


this also should be done when clearing the scene if you want to keep the camera and light sources. and regarding the context see this answer poll() failed, context incorrect?