minimaxir / download-tweets-ai-text-gen

Python script to download public Tweets from a given Twitter account into a format suitable for AI text generation.
MIT License
221 stars 41 forks source link

IndexError: list index out of range #27

Closed luisgbr1el closed 2 years ago

luisgbr1el commented 4 years ago

When I sent this in cmd: python download_tweets.py viniccius13

Has showed this error: image

How to fix this error?

arceuss commented 4 years ago

same here

luisgbr1el commented 4 years ago

same here

dude, is just edit the download_tweets.py.

in (default) 'username:none, limit:none, '

I did this changes: 'username:viniccius13, limit:16000,'

in your case, put the username that you want and the limit of tweets that you wanna download.

arceuss commented 4 years ago

same here

dude, is just edit the download_tweets.py.

in (default) 'username:none, limit:none, '

I did this changes: 'username:viniccius13, limit:16000,'

in your case, put the username that you want and the limit of tweets that you wanna download.

C:\Users\arceus\Pictures\arceus but ai\download-tweets-ai-text-gen>python download_tweets.py arceusoldandnewaccs.txt Retrieving tweets for @arceusoldandnewaccs.txt... Oldest Tweet: 0%| | 0/40000000 [00:00<?, ?it/s]CRITICAL:root:twint.get:User: CRITICAL:root:twint.get:User: CRITICAL:root:twint.get:User: CRITICAL:root:twint.get:User: Oldest Tweet: 0%| | 40/40000000 [04:05<68233:11:10, 6.14s/it]Traceback (most recent call last): File "download_tweets.py", line 161, in fire.Fire(download_tweets) File "C:\Users\arceus\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "C:\Users\arceus\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 463, in _Fire component, remaining_args = _CallAndUpdateTrace( File "C:\Users\arceus\AppData\Local\Programs\Python\Python38\lib\site-packages\fire\core.py", line 672, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "download_tweets.py", line 152, in download_tweets tweet_data[-1].datetime / 1000.0 IndexError: list index out of range Oldest Tweet: 0%|

RenCE1 commented 4 years ago

I'm having the same problem too, and luisgabriel53's solution doesn't seem to work.

luisgbr1el commented 4 years ago

I'm having the same problem too, and luisgabriel53's solution doesn't seem to work.

make sure that you're picking the updated version of download_tweets.py

the of 40 multiple tweets, not the of 20.

RenCE1 commented 4 years ago

Thank you, that worked

secwien commented 4 years ago

I'm getting the same error but I think I downloaded the updated script (in the master branch, updated on May 12). Any idea how could I fix this? thanks

Kasaneru commented 4 years ago

If you want to download all tweets you may just set some big limit for downloading

Like: python3 download_tweets.py user 100000