thansen Posted June 18 Share Posted June 18 Just installed Spotfire 14.4.0 and I am receiving the following error trying to execute a data function: Spotfire Enterprise Runtime for R returned an error (3) The data function 'RSProdAvg' could not be executed. Error in .package.execute.initialization.function(ns, ".onLoad", dirn : error executing function '.onLoad' from package 'glue' loaded from C:/Users/tyler/DOCUME~1/TERR/X86_64~1/6.1 : Error in registerS3method(generic, class, fun, envir = asNamespace(pk... : object 'vec_ptype2' not found Any help addressing would be appreciated. Link to comment Share on other sites More sharing options...
Dave Leigh Posted June 18 Share Posted June 18 I found the following entry in one of our Support Tickets for the same error message: Resolution: It typically helps to load the "vctrs" package before each data function's TERR script loads the "dplyr" package (or any other CRAN package). That is, use a sequence similar to the following commands at the very beginning of the script: library(vctrs) ibrary(dplyr) Also: remove dplyr (and other CRAN packages) from the data function's "Packages (separated by semicolons):" field in the data function's "Edit Script" dialog. (Otherwise, the Spotfire data function framework will make calls like 'library(dplyr)' before it starts to run the data function's TERR script.) . Background: The namespace for the "vctrs" package hasn't finished loading before the hidden .onLoad() initialization functions for "dplyr", "glue" and/or "tibble" (and others) try to use objects that only exist in the "vctrs" namespace. Calling library(vctrs) before calling library() for any other CRAN package helps to get the "vctrs" namespace fully loaded into the TERR session's working memory before the other packages need it. Hopefully this will work for you. Cheers Dave Link to comment Share on other sites More sharing options...
thansen Posted June 18 Author Share Posted June 18 Dave, thanks for the quick response. Updated my script to call library(vctrs) before library(dplyr), but now returning the error below. Any other ideas? Spotfire Enterprise Runtime for R returned an error The data function 'RSProdAvg' could not be executed. Error in .package.execute.initialization.function(ns, ".onLoad", dirn : error executing function '.onLoad' from package 'glue' loaded from C:/Users/tyler/DOCUME~1/TERR/X86_64~1/6.1 : Error in registerS3method(generic, class, fun, envir = asNamespace(pk... : object 'vec_ptype2' not found eval(script, envir = .GlobalEnv) eval(script, envir = .GlobalEnv) withCallingHandlers({ library(dplyr) .loadNamespace(package, lib.loc = lib.loc, keep.source = keep.source, .loadNamespaceImpl(package, path, keep.source, partial) .createImportEnv(nsinfo, package) loadNamespace(i) .loadNamespace(package, lib.loc, keep.source, partial, quietly, .loadNamespaceImpl(package, path, keep.source, partial) .package.execute.initialization.function(ns, ".onLoad", dirname(path), stop(paste("error executing function '", fn.name, "' from package '", Here's what my script looks like. I removed dplyr from the "Packages (seperated by semicolons):" input field. Link to comment Share on other sites More sharing options...
Alex Weir 2 Posted September 2 Share Posted September 2 Hi Thansen, I am having the same problem, wondered if you had managed to figure it out? Thanks, Alex Link to comment Share on other sites More sharing options...
Gaia Paolini Posted September 2 Share Posted September 2 What version of Spotfire are you running? Link to comment Share on other sites More sharing options...
Gaia Paolini Posted Monday at 10:15 AM Share Posted Monday at 10:15 AM There should be a hotfix available for this. Please check here: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now