clarivate / woslite_r_client

MIT License
1 stars 3 forks source link

"Failed to deserialize response" error #4

Open alanjern opened 3 years ago

alanjern commented 3 years ago

The following code (with X-ApiKey omitted) throws the following error: "Error in value [[3L]] (cond) : Failed to deserialize response".

library(wosliterclient)

var.database.id <- "WOS"
var.usr.query <- "WC=(psychology)"
var.count <- 1
var.first.record <- 1

#Submits a user query and returns results
api.instance <- SearchApi$new()
# Configure API key authorization: key
api.instance$apiClient$apiKeys['X-ApiKey'] <- [insert key here]
result <- api.instance$RootGet(var.database.id, var.usr.query, var.count, var.first.record)
dput(result)
gabrielesh commented 2 years ago

I get the exact same error. Please help!

Here's the traceback: `Error in value[3L] : Failed to deserialize response

traceback() 7: stop("Failed to deserialize response") 6: value[3L] 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4: tryCatchList(expr, classes, parentenv, handlers) 3: tryCatch(self$apiClient$deserialize(resp, "WosLiteResponse", loadNamespace("woslite_r_client")), error = function(e) { stop("Failed to deserialize response")`