0

I am using the Spotfire TERR Server to run an R Script. The R script runs fine locally.

I receive the following error from TERR:

The data function 'qualTest' could not be executed.

Error: 'vec_as_subscript2' is not an exported object from 'namespace:vctrs'
    eval(expr, envir, enclos)
    eval(expr, envir, enclos)
    fetch_survey(surveyID = "ZZZZ", verbose = T,
    infer_data_types(data, surveyID)
    dplyr::pull(dplyr::filter(md_parsed, supported), name)
    pull.data.frame(dplyr::filter(md_parsed, supported), name)
    tidyselect::vars_pull(names(.data), !(!enquo(var)))
    pull_as_location2(loc, n, vars)
    with_subscript_errors(type = "pull", {
    tryCatch(instrument_base_errors(expr), vctrs_error_subscript = function(cnd)
    instrument_base_errors(expr)
    withCallingHandlers(expr, simpleError = function(cnd)
    vctrs::vec_as_subscript2
    stop("'", name, "' is not an exported object from 'namespace:",
    function(cnd)
    abort(conditionMessage(cnd), parent = cnd)
    stop(cnd)
Parents:
 ─'vec_as_subscript2' is not an exported object from 'namespace:vctrs'

I looked at this answer here and based on it, confirmed the following:

  1. vec_as_subscript2 is in the vctrs package
  2. Function is available in the version of the package I am using.

Here are some additional details based on research that may help answer this question. I am using the qualtRics package, which is using other packages and functions in the background. I am using qualtRics 3.1.2, vctrs 0.1.0, pillar 1.4.3, and dplyr 0.7.8. The TERR server (Windows Server) uses R 3.5.2.

I am able to re install packages but, since I am limited to the versions available on TERR, I am unable to upgrade packages to later versions (or fall back to previous versions). I don't believe this is the issue as I can get the script to run locally, just not on the TERR server (if you are familiar with Spotfire this should make sense). I also ran this in RStudio pointing at the TERR server and was unable to recreate the issue. I'm just looking for someone to point me in the right directions because I'm a bit stuck.

Full R code provided below:

library(qualtRics)

qualtrics_api_credentials(api_key = "XXXX",
                          base_url = "YYYY")

output <- fetch_survey(surveyID = "ZZZZ", 
                    verbose = T,
                    force_request = T)
Mark P.
  • 1,827
  • 16
  • 37
  • 2
    `vec_as_subscript2()` didn't come out until version `vctrs` 0.2.2 try to update and re-run, https://cran.r-project.org/web/packages/vctrs/news/news.html – Mike Jul 26 '22 at 15:03
  • Running the code would require somebody setting up their own access to qualtrics. Given also that the problem potentially depends on the versions of a number of packages, including TERR version, I would suggest to open a support case with TIBCO – Gaia Paolini Jul 27 '22 at 11:18

0 Answers0