bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 957 forks source link

twitter.error.TwitterError: File size exceeds 5242880 bytes #662

Closed reisenmachtfreude closed 2 years ago

reisenmachtfreude commented 4 years ago

According to Twitter API there should be up to 15MB uploads possible (e.g. gif file) Using python twitter API the limit seems to be much lower, which I don't understand:

twitter.error.TwitterError: File size exceeds 5242880 bytes.

reisenmachtfreude commented 4 years ago

probably the API thinks I'm uploading an image (limit is 5 MB) instead of gif. Code: status = api.PostUpdate("some text",media=pathToGif)

Bracciata commented 4 years ago

I am looking into this now and beginning to assume that the issue is we are using a dated link when posting a gif. I will update you with solution!

Bracciata commented 4 years ago

I am adding a merge request for the logic to fix this and I will link you to it when I am complete.