Twitter API returned a 400 (Bad Request), media_ids parameter is invalid - if first item in list is null string #494
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#494
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Twitter API rejects the POST to update/status with the error
Twitter API returned a 400 (Bad Request), media_ids parameter is invalidif a list is passed to the media_ids parameter and the first item of the list is a null string.
Thus:
will fail with the error
nb if null string is the second item in the list (eg ['1234567890', '']), no exception is raised.
List can be up to length of 4 items, but I haven't tested other null positions.
Not sure if this is so much a Twython issue as a Twitter issue tbh.
for the sake of anyone else tripping over this and finding my post here, my workaround is to do:
@RedactedCode Are you working on the PR?
@hridaydutta123 No, not unless you want Twython broken beyond repair