-
I seem to be getting 409 error on my stream. From what I've researched, it seems like the error could be due to multiple instances of stream running. However, I don't have any other instances of stream running. I've tested this on multiple accounts and re-created multiple apps but I still seem to have this issue. Stream.sample() also seems to be working, however when I filter, I get the error. Can someone help out?
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Literally the same issue here. I've used a bearer token and getting a Best part about this is that Twitter doesn't even mention EDIT: Even though it's not a fix it looks like the issue is in the |
Beta Was this translation helpful? Give feedback.
-
While debugging I have found that the issue was caused by not adding
After adding an example rule from Twitter Docs the filter method doesn't result in a Working example:
|
Beta Was this translation helpful? Give feedback.
-
That is correct. I figured a workaround by using twarc to add rules instead. I'll check out your method as well. It's very inconvenient that the error wasn't mentioned properly in the docs. But anyhow, I suppose this works. |
Beta Was this translation helpful? Give feedback.
-
I believe the 409 Conflict error occurs when you subsequently attempt to start the stream with no existing rules, since that rule was invalid and not created. You can simply add the rule directly as a string instead, e.g. As for the lack of documentation for 409 errors on Twitter's end, I've passed that feedback along. |
Beta Was this translation helpful? Give feedback.
StreamRule
expects a string.stream.add_rules(tweepy.StreamRule(['@MyAccount is:reply']))
will return a Response with an error:I believe the 409 Conflict error occurs when you subsequently attempt to start the stream with no existing rules, since that rule was invalid and not created.
You can simply add the rule directly as a string instead, e.g.
stream.add_rules(twee…