Azure / Azure-TDSP-Utilities

Utilities and scripts developed as part of Microsoft's Team Data Science Process for productive data science
Creative Commons Attribution 4.0 International
373 stars 275 forks source link

Error in convert: failed to copy rendered pandoc artefact #8

Closed pdelboca closed 7 years ago

pdelboca commented 7 years ago

Hello!

I'm giving a try to this tool. When trying to run the example I got this error after selecting the YAML (both of them)

Warning: Error in convert: failed to copy rendered pandoc artefact to 'C:/Users/pdelb_000/AppData/Local/Temp/RtmpEFeRzj/file15c86d2872d5.html'
Stack trace (innermost first):
    94: convert
    93: <Anonymous>
    92: do.call
    91: contextFunc
    90: .getReactiveEnvironment()$runWith
    89: shiny::maskReactiveContext
    88: reactive reactive({
    out <- rmd_cached_output(file, encoding)
    output_dest <- out$dest
    if (out$cached) {
        if (nchar(out$resource_folder) > 0) {
            shiny::addResourcePath(basename(out$resource_folder), 
                out$resource_folder)
        }
        return(out$shiny_html)
    }
    if (!file.exists(dirname(output_dest))) {
        dir.create(dirname(output_dest), recursive = TRUE, mode = "0700")
    }
    resource_folder <- knitr_files_dir(output_dest)
    perf_timer_reset_all()
    dependencies <- list()
    shiny_dependency_resolver <- function(deps) {
        dependencies <<- deps
        list()
    }
    output_opts <- list(self_contained = FALSE, copy_resources = TRUE, 
        dependency_resolver = shiny_dependency_resolver)
    message("\f")
    args <- merge_lists(list(input = reactive_file(), output_file = output_dest, 
        output_dir = dirname(output_dest), output_options = output_opts, 
        intermediates_dir = dirname(output_dest), runtime = "shiny", 
        envir = new.env()), render_args)
    result_path <- shiny::maskReactiveContext(do.call(render, 
        args))
    if (!dir_exists(resource_folder)) 
        dir.create(resource_folder, recursive = TRUE)
    shiny::addResourcePath(basename(resource_folder), resource_folder)
    dependencies <- append(dependencies, list(create_performance_dependency(resource_folder)))
    write_deps <- base::file(file.path(resource_folder, "shiny.dep"), 
        open = "wb")
    on.exit(close(write_deps), add = TRUE)
    serialize(dependencies, write_deps, ascii = FALSE)
    if (!isTRUE(out$cacheable)) {
        shiny::onReactiveDomainEnded(shiny::getDefaultReactiveDomain(), 
            function() {
                unlink(result_path)
                unlink(resource_folder, recursive = TRUE)
            })
    }
    shinyHTML_with_deps(result_path, dependencies)
})
    77: doc
    76: shiny::renderUI
    75: func
    74: output$__reactivedoc__
     7: <Anonymous>
     6: do.call
     5: rmarkdown::run
     4: eval [C:/Users/pdelb_000/Projects/Azure-TDSP-Utilities/DataScienceUtilities/DataReport-Utils/Run-IDEAR.R#13]
     3: eval
     2: withVisible
     1: source

I'm using Windows 10, Latest RStudio Version 1.0.44

sessionInfo()

R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shinyjs_0.8          scatterplot3d_0.3-37 vcd_1.4-3            foreach_1.4.3       
[5] RODBC_1.3-14         yaml_2.1.13          shiny_0.13.2         rmarkdown_0.9.6.14  

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.0      knitr_1.12       magrittr_1.5     MASS_7.3-43      lattice_0.20-33 
 [6] colorspace_1.2-6 xtable_1.8-2     R6_2.1.1         stringr_1.0.0    tools_3.2.2     
[11] miniUI_0.1.1     htmltools_0.3.5  iterators_1.0.8  digest_0.6.8     lmtest_0.9-34   
[16] formatR_1.4      codetools_0.2-14 evaluate_0.9     mime_0.4         stringi_0.5-5   
[21] jsonlite_0.9.21  httpuv_1.3.3     zoo_1.7-12     

Thanks!

hangzh-msft commented 7 years ago

Hi,

Thanks for trying IDEAR. Can you please update your R to 3.3.1 and try it again?

Let me know whether it works.

Hang

pdelboca commented 7 years ago

Hi,

I've installed R 3.3.2 and it worked!

I had a problem with the knitr package when the application loaded.

Since I installed a new core, I needed to re-install all the packages again, IDEAR installed correctly all the dependencies except knitr and it throw an error because it couldn't find the package.

I tried to install knitr manually and it also throw an error:

 ERROR: dependency 'formatR' is not available for package 'knitr'

After that, I installed both formatR and knitr manually and now IDEAR is working perfectly.

Thanks!

hangzh-msft commented 7 years ago

pdelboca,

Thanks for the feedback, and glad to see that it is working now for you.

We will work on the dependency issue and see how much we can make the installation experience easier.

Best,

Hang