tommeagher / heroku_ebooks

An archive of a script to generate Markov chains and to post to an _ebooks account on Twitter using Heroku. No longer actively supported.
264 stars 163 forks source link

Twitter grab fails if user has fewer than 3,600 tweets #6

Closed tommeagher closed 8 years ago

tommeagher commented 10 years ago

Obviously the more tweets to work from, the better, but this does seem like a relatively simple bug to fix.

joesondow commented 8 years ago

The attempted fix by @petejscott does not appear to have fixed the bug. I still get the same error. My source twitter account https://twitter.com/RikerGoogling has around 1500 tweets and I still get the same error.

Running worker on ⬢ salty-inlet-81991... up, run.9080 (Free)
Traceback (most recent call last):
  File "ebooks.py", line 79, in <module>
    source_tweets_iter, max_id = grab_tweets(api,max_id)
  File "ebooks.py", line 51, in grab_tweets
    max_id = user_tweets[len(user_tweets)-1].id-1
IndexError: list index out of range