Error in read_redcap():
✖ The REDCapR export operation was not successful.
! An unexpected error occured.
ℹ This means that you probably discovered a bug!
ℹ Please consider submitting a bug report here:
https://github.com/CHOP-CGTInformatics/REDCapTidieR/issues.
Caused by error in inherits():
! object 'ds' not found
Run rlang::last_trace() to see where the error occurred.
traceback()
17: stop(fallback)
16: signal_abort(cnd, .file)
15: rlang::abort(message, ..., call = call, use_cli_format = TRUE,
.frame = .frame)
14: cli_abort(c(condition$message, condition$info), call = condition$call,
parent = condition$parent, class = condition$class)
13: handlers[1L]
12: h(simpleError(msg, call))
11: .handleSimpleError(function (cnd)
{
{
.handler_frame. <- TRUE
.setup_frame. <- frame
if (inherits(cnd, "message")) {
except <- c("warning", "error")
}
else if (inherits(cnd, "warning")) {
except <- "error"
}
else {
except <- ""
}
}
while (!is_null(cnd)) {
if (inherits(cnd, "error")) {
out <- handlers[1L]
if (!inherits(out, "rlang_zap"))
throw(out)
...
10: redcap_metadata_read(redcap_uri = redcap_uri, token = token,
verbose = !suppress_redcapr_messages)
9: eval_tidy(quo)
8: withCallingHandlers(expr, condition = function(cnd) {
{
.handler_frame. <- TRUE
.setup_frame. <- frame
if (inherits(cnd, "message")) {
except <- c("warning", "error")
}
else if (inherits(cnd, "warning")) {
except <- "error"
}
else {
except <- ""
}
}
while (!is_null(cnd)) {
if (inherits(cnd, "error")) {
out <- handlers[1L]
if (!inherits(out, "rlang_zap"))
throw(out)
}
...
7: doTryCatch(return(expr), name, parentenv, handler)
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
4: tryCatch(withCallingHandlers(expr, condition = function(cnd) {
{
.handler_frame. <- TRUE
.setup_frame. <- frame
if (inherits(cnd, "message")) {
except <- c("warning", "error")
}
else if (inherits(cnd, "warning")) {
except <- "error"
}
else {
except <- ""
}
}
while (!is_null(cnd)) {
if (inherits(cnd, "error")) {
out <- handlers[1L]
if (!inherits(out, "rlang_zap"))
throw(out)
}
...
3: try_fetch(eval_tidy(quo), error = function(cnd) {
if (str_detect(cnd$message, "Could not resolve host")) {
condition$info <- c(! = "Could not resolve the hostname.",
i = "Is there a typo in the URI?", i = "URI: {condition$redcap_uri}")
condition$class <- c("cannot_resolve_host", condition$class)
}
else {
condition$parent <- cnd
condition$class <- c("unexpected_error", condition$class)
}
cli_abort(c(condition$message, condition$info), call = condition$call,
parent = condition$parent, class = condition$class)
}, warning = function(cnd) {
cli_warn(message = c(! = "One of the {.pkg REDCapR} operations produced a warning. See below for details."),
call = condition$call, parent = cnd, class = c("unexpected_warning",
condition$class))
cnd_muffle(cnd)
zap()
})
2: try_redcapr({
redcap_metadata_read(redcap_uri = redcap_uri, token = token,
verbose = !suppress_redcapr_messages)
})
1: read_redcap(url, api_tokn)
Please let me know if I am doing something wrong or if in fact there is a bug.
Expected Behavior
Hi, I have attempted to run the following for the first time
install.packages("REDCapTidieR") library(REDCapTidieR)
url <- "REDACTED" #I HAVE REMOVE THE NAME
api_tokn <- "REDACTED"#I HAVE REMOVE THE TOKEN
clin_data <- read_redcap(url, api_tokn)
and get the following error message
Error in
read_redcap()
: ✖ The REDCapR export operation was not successful. ! An unexpected error occured. ℹ This means that you probably discovered a bug! ℹ Please consider submitting a bug report here: https://github.com/CHOP-CGTInformatics/REDCapTidieR/issues. Caused by error ininherits()
: ! object 'ds' not found Runrlang::last_trace()
to see where the error occurred.Please let me know if I am doing something wrong or if in fact there is a bug.
Thanks!