Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Unidentified values: withheld_scopewithheld_copyrightwithheld_in_countries. #647

Closed
alexpghayes opened this issue Jan 31, 2022 · 4 comments · Fixed by #650
Closed

Unidentified values: withheld_scopewithheld_copyrightwithheld_in_countries. #647

alexpghayes opened this issue Jan 31, 2022 · 4 comments · Fixed by #650
Labels

Comments

@alexpghayes
Copy link
Contributor

Just got this error from an rtweet call nested deep in some other code. Working on a reprex but posting here in the meantime per request in the error message itself.

Error in FUN(X[[i]], ...) : 
Unidentified value: withheld_scopewithheld_copyrightwithheld_in_countries.
Please open an issue and notify the maintainer. Thanks!
13.
stop("Unidentified value: ", end, ".\n\tPlease open an issue and notify the maintainer. Thanks!")
12.
FUN(X[[i]], ...)
11.
lapply(status, tweet)
10.
do.call("rbind", lapply(status, tweet))
9.
users_with_tweets(results)
8.
rtweet::lookup_users(nodes, retryonratelimit = graph$retryonratelimit, 
verbose = graph$verbose) at graph-rtweet.R#57
@llrs llrs added the bug label Jan 31, 2022
@llrs
Copy link
Collaborator

llrs commented Jan 31, 2022

Thanks for reporting this, this is enough to diagnose the problem. It seems that there are new fields on your data not previously reported by Twitter API documentation: c("withheld_scope", "withheld_copyright", "withheld_in_countries"), even though they were announced on 2012

If you could find which tweet has these fields I could add a test to make sure this still will work from now on and correctly ensure that it is correctly handled.

@alexpghayes
Copy link
Contributor Author

Partial reprex:

f <- rtweet::get_friends("71048726")
l <- rtweet::lookup_users(f$to_id)
#> Error in FUN(X[[i]], ...): Unidentified value: withheld_in_countries.
#>  Please open an issue and notify the maintainer. Thanks!

Created on 2022-01-31 by the reprex package (v2.0.1.9000)

@alexpghayes
Copy link
Contributor Author

Reprex for the rest of it

f <- rtweet::get_friends("15926695")
l <- rtweet::lookup_users(f$to_id)
#> Error in FUN(X[[i]], ...): Unidentified value: withheld_scopewithheld_copyrightwithheld_in_countries.
#>  Please open an issue and notify the maintainer. Thanks!

Created on 2022-01-31 by the reprex package (v2.0.1.9000)

@llrs
Copy link
Collaborator

llrs commented Feb 8, 2022

To make it minimal (easier to know where the problem is, and less API queries) I picked your second reprex. After exploring the values unparsed, I found which status was the one with these fields.

lu <- rtweet::lookup_tweets("1168343686863892480")

Surprisingly the text of the tweet says it is "This Tweet from @screenanme has been withheld in: United States." but the withheld_in_countries only says it is on XY and my query is not from United States!

@llrs llrs closed this as completed in #650 Feb 8, 2022
llrs added a commit that referenced this issue Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants