How to set use_keyframe_insert_auto?

I’m trying to set use_keyframe_insert_auto (the automatic keyframe insertion for objects and bones button – the one that has a red dot on the Timeline window) and it doesn’t appear to be working. I’m not getting an error, either.

import bpy["Scene name here"].tool_settings.use_keyframe_insert_auto = True

What am I doing wrong?

Is your scene named “Scene name here”?

Yes. (I put that as a fake scene name.)

Weird. Actually, the command works – it’s just that the Timeline window doesn’t update to show the new state of the button until I hover over it with the mouse. Go figure.