ropensci / rtweet

🐦 R client for interacting with Twitter's [stream and REST] APIs
https://docs.ropensci.org/rtweet
Other
786 stars 201 forks source link

search_tweets error #240

Closed jerive31 closed 6 years ago

jerive31 commented 6 years ago

Hi,

I've been trying to use the template to retrieve data and text from Twitter but continue to encounter an error when trying to run the search_tweets function. I'm new to R and perhaps this has a simple solution, but I tried searching and haven't found anything particularly helpful and decided to pursue this option. Hope someone out there can help and thanks in advance. I'm running R 3.5 if that helps.

search for 18000 tweets using the rstats hashtag

mytweets <- search_tweets("#rstats", n = 18000, include_rts = FALSE)

Error in $<-.data.frame(*tmp*, "reset", value = NAcharacter) : replacement has 1 row, data has 0

vhmedina commented 6 years ago

Hello! I have the same issue. The traceback is the following

10: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), N, nrows), domain = NA) 9: $<-.data.frame(*tmp*, "reset", value = NAcharacter) 8: $<-(*tmp*, "reset", value = NAcharacter) 7: .rl_df(r) 6: ratelimit(token, query, parse) 5: rate_limit.default(token, "search/tweets") 4: rate_limit(token, "search/tweets") 3: searchtweets(q = "#rstats", n = 2000, type = "recent", include_rts = TRUE, geocode = NULL, max_id = NULL, parse = TRUE, token = , retryonratelimit = TRUE, verbose = TRUE, since = 17680, until = 17681) 2: do.call("searchtweets", args) 1: rtweet::search_tweets(query_aux, n = 2000, token = token, since = search_date - 1, until = search_date, retryonratelimit = T)

Arf9999 commented 6 years ago

Something has definitely changed. Scripts that were working fine yesterday morning are now failing with this error.

Has Twitter made a change to the API?

diplodata commented 6 years ago

Ditto. Broken. lookup_users still works, but get_timeline and get_favorites fail as above, which suggests problem is API related.

maelle commented 6 years ago

I re-created the app and token but it didn't help, I get the exact same error. cc @stephlocke

hrbrmstr commented 6 years ago

Twitter is having API issues right now https://twittercommunity.com/t/application-rate-limit-status-broken/106429/3

diplodata commented 6 years ago

Twitter say "We’ve rolled back the change, and will monitor for further issues in this area". API is still down for me however. Has anyone got their apps working again?

JBGruber commented 6 years ago

My script ran normally this morning. It uses get_timeline and search_tweets. Both seem to work fine again.

Edit: Also just tried it on my Windows machine. The other script runs on Linux. Seems to be fixed for me.

hrbrmstr commented 6 years ago

timeline functions are still busted for me but the search works