Search code examples
pythonpython-3.xtwittertweepy

video upload on tweepy


I was trying to update my own status with only a video, but for some reason, it doesn't work. All of them are .mp4 with less than 1MB.

When I try upload_result = api.media_upload('file.mp4') it raises a TweepError saying that the file type could not be determined.

When I try upload_result = api.media_upload(filename = "path of the file", file = "file.mp4") it triggers [Errno13], saying "Permission Denied"

My IDE is Pycharm Community Edition and I am using python 3.9

If you want the full code, just ask for it in the comments


Solution

  • According to the Tweepy documentation you can only upload images

    Use this endpoint to upload images to Twitter.

    The upload of video is not currently supported, there is an issue open so it will probably come at some point.