Skip to content Skip to sidebar Skip to footer

Tweepy Update Status With Media -unicodedecodeerror: 'ascii' Codec Can't Decode Error

Using Tweepy to update twitter post with photo. Update with status alone works fine. I am building my file name / path in Windows as follows: path = 'C:/Users/foo/Documents/media/'

Solution 1:

Resolved this by updating to newer version of Tweepy. I had only recently installed Tweepy but somehow got an older version.

I was using v 2.3 and did pip install --upgrade tweepy which updated to v 3.3

The underlying issue appeared to be that Twitter had since deprecated their update status with media process so the newer version of Tweepy included those changes.

However very nice to see that Tweepy keeps their functionality the same. The function 'api.update_with_media(filename, status=tweet)' is in new version too and Tweepy simply deals with Twitter API changes 'under the hood'.

Post a Comment for "Tweepy Update Status With Media -unicodedecodeerror: 'ascii' Codec Can't Decode Error"