Skip to content

Commit

Permalink
Apparently, media ids are strings
Browse files Browse the repository at this point in the history
Nevermind that they are returned as integers from the same APIs, they
need to be passed as strings.
  • Loading branch information
mhagander committed Dec 12, 2023
1 parent 5350c69 commit 8faa2ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgresqleu/util/messaging/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def post(self, tweet, image=None, replytotweetid=None):
if r.status_code != 200:
return (None, 'Media upload: {}'.format(r.text))
d['media'] = {
'media_ids': [r.json()['media_id'], ]
'media_ids': [str(r.json()['media_id']), ]
}

while d['text']:
Expand Down

0 comments on commit 8faa2ba

Please sign in to comment.