Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

Commented Unassigned: ArgumentNullException on SearchTweets [2280]

$
0
0
Hello there,

I keep getting ArgumentNullExceptions when I try to search for Tweets. Stack Trace:
```
bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
bei Tweetinvi.Search.SearchTweets(ITweetSearchParameters tweetSearchParameters)
bei TwitterAppV0.Classes.TwitterAPI.SearchQuery() in c:\*somewhere*\Classes\TwitterAPI.cs:Zeile 115.
```
The exception is: Value must not be NULL. Parametername: source
Code:
```
_search_query = Search.GenerateSearchTweetParameter(_query_string);
_search_query.Since = _starting_date;
_search_query.SinceId = _since_tweet_id;
_search_query.MaxId = _until_tweet_id;
_search_query.MaxId = _search_results[_index].Id - 1;
_search_query.MaximumNumberOfResults = 100;
_search_query.SearchType = SearchResultType.Recent;
_search_results = Search.SearchTweets(_search_query); /* crashes here */
```
I'm using the newest version of the library (0.9.3.3). With the older version of the library (0.9.2.3) I constantly got NullReferenceExceptions.

Kind regards,
Wolfram
Comments: ** Comment from web user: whofmeis **

Hey,

to give you the exact values is quite difficult, i run this in a for loop that downloads as many tweets as possible, and sets MaxId and SinceId accordingly. But generally i start off with a simple query containing one keyword, a startdate, and a MaxId that is set to long.MaxValue. It usually seems to crash when i approach the RateLimit, and it then keeps crashing for some period of time (again, I suspect the RateLimit to be the problem here). Normally I load up to 18k Tweets until the API crashes, which suits the RateLimit pretty well, given that I download 100 ~tweets everytime I run the search query.

Kind regards,
Wolfram


Viewing all articles
Browse latest Browse all 4126

Trending Articles