I try to run this code:
library (stackr)
df <- data.frame(id = c(1144035, 58936751))
for (j in 1:2) {
tryCatch({
reputation_history <- stack_users(df$id[j], "reputation-history")
}, error = function( err ) {
print(paste( "Error:", err ))
})}
However I receive this error:
No encoding supplied: defaulting to UTF-8. [1] "Error: Error: lexical error: invalid char in json text.\n Too\n (right here) ------^\n\n"
I use the try and catch to make the code continue working. However it doesn't work. Is there any possibility to keep it working and keep the id which had the error?