Closed nadesai closed 2 years ago
Interesting... I'm not sure how we should address this, if there is no way of differentiating this situation from a rate limit error :/ Does the api really return the error code 88 (rate limit) in this case?
Should we just stop after some number of unsuccessful attempts?
No, I should be clear that I do not know what code is returned by the API. I only meant to say that from the perspective of the current codebase, the zero-following and rate-limit case look identical.
Oh okay, but I guess that must be the case since that error code is being checked in the rate-limit handling logic. Do you know a twitter account that follows 0 people, so I can check what's going on?
@dalailama
is one such account (https://twitter.com/dalailama).
I put a small patch for this issue in this PR: https://github.com/eleurent/twitter-graph/pull/30
That is fixed, I believe
(Looks like the actual reason was a bug in the code. The code attempted to fetch from the API while not user_friends
, but since the API returns an empty list, user_friends
keeps the value []
for such users and the code continues to loop forever.)
Yes exactly
This is referenced in https://github.com/eleurent/twitter-graph/issues/15#issuecomment-950232393, but is likely significant enough to warrant a separate issue.
The script loops indefinitely when trying to fetch information for accounts that follow 0 people. The lack of contentful response from the API when requesting follows/friendships seems to be incorrectly interpreted as a rate limit.