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/'
photoname = 'photo1.jpg'
filename = path + photoname
This prints out as a nicely formatted path and copied into Windows Explorer, opens the photo, so the path and photo name are correct.
However, when I execute with the filename in the update_with_media:
api.update_with_media(filename, status=tweet)
I get the following error message:
File "build/bdist.macosx-10.9-intel/egg/tweepy/api.py", line 98, in update_with_media
File "build/bdist.macosx-10.9-intel/egg/tweepy/api.py", line 747, in _pack_image
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
Any ideas on what is happening?
Thanks!