Skip to content
New issue

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

AsyncStreamingClient.delete_rules raises tweepy.errors.BadRequest, when called with a list of StreamRule. #1942

Closed
breuxi opened this issue Aug 18, 2022 · 1 comment
Labels
Bug This is regarding a bug with the library

Comments

@breuxi
Copy link

breuxi commented Aug 18, 2022

Greetings!

While developing a project I came across a strange error:
tweepy.errors.BadRequest: 400 Bad Request '_tuplegetter(2, 'Alias for field number 2')' is not a valid Long

Investigating with my debugger, I found out this happens because the StreamRule class is used instead of the current StreamRule Tuple Object.

This is the exact place in the code, which should be json["delete"]["ids"].append(str(id.id)) to function properly.

json["delete"]["ids"].append(str(StreamRule.id))

Should I open a PR for that, or do you want to do this?

Have a nice day everyone, and don't forget to drink enough! 🥤

@Harmon758 Harmon758 added the Bug This is regarding a bug with the library label Aug 18, 2022
@Harmon758
Copy link
Member

Thanks for the bug report! This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is regarding a bug with the library
Projects
None yet
Development

No branches or pull requests

2 participants