We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitter API rejects the POST to update/status with the error
Twitter API returned a 400 (Bad Request), media_ids parameter is invalid
if a list is passed to the media_ids parameter and the first item of the list is a null string. Thus:
init_data = ['', '1234567890'] twitter.update_status(status='some string', media_ids=init_data)
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:
init_data = list(filter(None, string_list))
The text was updated successfully, but these errors were encountered:
@RedactedCode Are you working on the PR?
Sorry, something went wrong.
@hridaydutta123 No, not unless you want Twython broken beyond repair
No branches or pull requests
Twitter API rejects the POST to update/status with the error
Twitter API returned a 400 (Bad Request), media_ids parameter is invalid
if 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:
The text was updated successfully, but these errors were encountered: