datadrivencv icon indicating copy to clipboard operation
datadrivencv copied to clipboard

error executing render_cv.r

Open harshameghadri opened this issue 5 years ago • 1 comments

Hey Nick,

I get the following error when I try to render the CV.

processing file: cv.rmd |... | 3% inline R code fragments

|....... | 5% label: unnamed-chunk-20 (with options) List of 1 $ include: logi FALSE

Quitting from lines 15-29 (cv.rmd) Error in file(filename, "r", encoding = encoding) : cannot open the connection

traceback()

20: file(filename, "r", encoding = encoding) 19: source("cv_printing_functions.r") 18: eval(expr, envir, enclos) 17: eval(expr, envir, enclos) 16: withVisible(eval(expr, envir, enclos)) 15: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler) 14: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)) 13: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler))) 12: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing) 11: evaluate::evaluate(...) 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (options$error && options$include) 0L else 2L, output_handler = knit_handlers(options$render, options)) 9: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (options$error && options$include) 0L else 2L, output_handler = knit_handlers(options$render, options))) 8: block_exec(params) 7: call_block(x) 6: process_group.block(group) 5: process_group(group) 4: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { setwd(wd) cat(res, sep = "\n", file = output %n% "") message("Quitting from lines ", paste(current_lines(i), collapse = "-"), " (", knit_concord$get("infile"), ") ") }) 3: process_file(text, output) 2: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 1: rmarkdown::render("/mnt/dzl_bioinf/meghadri/learning/cv/cv.rmd", params = list(pdf_mode = FALSE), output_file = "cv.html")

Could you please point me how to fix this?

harshameghadri avatar Aug 03 '20 11:08 harshameghadri

This is likely caused by cv.Rmd trying to read "CV_printing_functions.r" however, this file has a capital R extension -> "CV_printing_functions.R" as you can see here and here.

Quick fix is to just "CV_printing_functions.R" to "CV_printing_functions.r" as it lives in your local filesystem anyway.

Let's see if I have the time for a PR to fix this.

BerriJ avatar Dec 29 '20 14:12 BerriJ