On line one, you're uploading your file to Twitter, and the response (including a unique identifier for the media file you just uploaded) is stashed in the response variable. You need that ID because when you then send your tweet with update_status, you need to attach the file to your tweet, and you do that by passing the ID of the media file along with your tweet: media_ids=[response['media_id']]
To verify the media upload worked, I'd probably start by just printing out response['media_id'] and seeing if it looks sane. E.g.
For a pause, put
near the top, then insert
between the upload_video and update_status lines. It'll probably achieve nothing, but it's something I'd try out of curiosity.
For verifying that the upload_video step is successful:
On line one, you're uploading your file to Twitter, and the response (including a unique identifier for the media file you just uploaded) is stashed in the response variable. You need that ID because when you then send your tweet with update_status, you need to attach the file to your tweet, and you do that by passing the ID of the media file along with your tweet: media_ids=[response['media_id']]
To verify the media upload worked, I'd probably start by just printing out response['media_id'] and seeing if it looks sane. E.g.