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

build_home(): Error in file(con, "r") : cannot open the connection #263

Closed
pat-s opened this issue Jan 8, 2017 · 3 comments
Closed

build_home(): Error in file(con, "r") : cannot open the connection #263

pat-s opened this issue Jan 8, 2017 · 3 comments

Comments

@pat-s
Copy link
Contributor

pat-s commented Jan 8, 2017

Debugging:

Caused by render_rmd():

render_rmd(pkg, input, "index.html", depth = depth, 
      data = data, toc = FALSE, strip_header = TRUE)

Quitting from lines 18-20 (README.Rmd)
Error in file(con, "r") : cannot open the connection

Problematic lines in README.Rmd (first R code chunk in README):

description <- readLines("DESCRIPTION")
version <- gsub(" ", "", gsub("Version:", "", 
                grep("Version:", description, value = TRUE)))
@hadley
Copy link
Member

hadley commented Mar 12, 2017

I don't understand the problem

@pat-s
Copy link
Contributor Author

pat-s commented Mar 12, 2017

When calling build_home(), I get the above mentioned error.

It is caused by

version <- gsub(" ", "", gsub("Version:", "", 
                grep("Version:", description, value = TRUE)))

I did not find a solution and just used a direct assignment version <- "0.1" instead of trying to gsub() it from the DESCRIPTION file. The error is only thrown by build_home() and not when normally knitting README.Rmd.

@hadley
Copy link
Member

hadley commented Mar 12, 2017

Closing since you seem to have a solution.

@hadley hadley closed this as completed Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants