Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreatePackageReport() fails to generate report #257

Closed
jameslamb opened this issue Oct 22, 2019 · 5 comments
Closed

CreatePackageReport() fails to generate report #257

jameslamb opened this issue Oct 22, 2019 · 5 comments

Comments

@jameslamb
Copy link
Collaborator

jameslamb commented Oct 22, 2019

I'm unsure of the exact issue, but the following code

pkg_name <- YOUR_PACKAGE_NAME
CreatePackageReport(
    pkg_name
    , report_path = file.path(getwd(), "report.html")
)

fails to generate a report at all and returns this in the logs

Error in readLines(con, warn = FALSE) : cannot open the connection
Calls: <Anonymous> ... base -> extract_preserve_chunks -> read_utf8 -> readLines
In addition: Warning message:
In readLines(con, warn = FALSE) :
  cannot open file 'package_report.utf8.md': No such file or directory
Execution halted
pandoc: package_report.utf8.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1

I have found that this error is transient, so might be hard to figure out.

I've observed this for the following packages:

  • AICcmodavg
  • ape
  • arulesViz
  • base64
  • CALIBERrfimpute
  • circlize
  • corrgram
  • corrplot
  • desc
  • dbplyr
  • DoE.base
  • emulator
  • EpiModel
  • futile.logger
  • gamlss.data
  • geoR
  • geosphere
  • heplots
  • kinship2
  • lambda.r
  • LaplacesDemon
  • magic
  • mirt
  • nnet
  • ordinal
  • party
  • plyr
  • qrng
  • quantreg
  • R.oo
  • Rcmdr
  • reticulate
  • rpart.plot
  • RUnit
  • slam
  • speedglm
  • survival
  • svd
  • tibble
  • tools
  • translations
  • trimcluster
  • tweedie
  • xfun
  • xopen
  • yaml

discovered via the code in #252

@jameslamb
Copy link
Collaborator Author

Removed the Hacktoberfest label from this one since the issue is so difficult and transient and possibly just related to bugs in my code in a draft PR (#252 )

@jameslamb jameslamb mentioned this issue Oct 22, 2019
@rekado
Copy link

rekado commented May 22, 2021

This issue happens when knitr / rmarkdown builds more than one report from the same template at once. By default rmarkdown::render will drop intermediary files in the directory of the report template. When you render more than one report from the same template it will end up deleting or overwriting these intermediary files.

When using rmarkdown::render the solution is to specify a unique intermediates_dir for each report.

@jameslamb
Copy link
Collaborator Author

Thanks very much for that information? Are you interested in proposing a pull request?

@rekado
Copy link

rekado commented May 23, 2021

No thanks. I haven't even looked at your code yet :) I just happened to stumble upon the exact same error message in a project I was working on and thought I'd share what I found.

@jameslamb
Copy link
Collaborator Author

no problem, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants