Jefferson-Henrique / Jefferson-Henrique/GetOldTweets-python
'None Type' error
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 790
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
first of all: thanks for this great tool!
I use the Python 2 version from the command line and I get a 'None Type' error in some of my queries. I can't figure out what the problem is. It occurs for some query terms and not for others. For example, the query `alt-right` (`python Exporter.py --querysearch "alt-right" --since 2017-01-01 --until 2017-08-01`) throws an error if I specify no limit or anything more than 100 max. tweets and never returns more than 100 tweets. The same query but with the term `alt-left`, however, doesn't throw an error and catches a lot (!) more (20,000 for the first run which went back until May).
Could it depend on how many results there are to find? This would still be puzzling, as `alt-right` should produce more results than `alt-left`, so no reason to end searching for the former earlier than for the latter.
Here's the full error message:
```
Traceback (most recent call last):
File "Exporter.py", line 79, in
main(sys.argv[1:])
File "Exporter.py", line 70, in main
got.manager.TweetManager.getTweets(tweetCriteria, receiveBuffer)
File ".../GetOldTweets/got/manager/TweetManager.py", line 40, in getTweets
retweets = int(tweetPQ("span.ProfileTweet-action--retweet span.ProfileTweet-actionCount").attr("data-tweet-stat-count").replace(",", ""));
AttributeError: 'NoneType' object has no attribute 'replace'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.