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

An error occured when knitting #41

Closed
psychelzh opened this issue Mar 18, 2018 · 7 comments
Closed

An error occured when knitting #41

psychelzh opened this issue Mar 18, 2018 · 7 comments

Comments

@psychelzh
Copy link

psychelzh commented Mar 18, 2018

When knitting, error occurred with the following message:

Error reading bibliography .\bib/packages.bib (line 94, column 1):
unexpected "}"
expecting space or "="
Error running filter pandoc-citeproc:
Filter returned error status 1

SessionInfo:

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

other attached packages:
[1] RevoUtils_10.0.7     RevoUtilsMath_10.0.1

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.15    bookdown_0.7    digest_0.6.15   rprojroot_1.3-2 backports_1.1.2 magrittr_1.5   
 [7] evaluate_0.10.1 stringi_1.1.6   rmarkdown_1.9   tools_3.4.3     stringr_1.3.0   xfun_0.1       
[13] yaml_2.1.18     compiler_3.4.3  htmltools_0.3.6 knitr_1.20 
@psychelzh psychelzh changed the title The latest release v0.3.0 throws an error when knitting An error occured when knitting Mar 18, 2018
@psychelzh
Copy link
Author

psychelzh commented Mar 18, 2018

And I checked those lines in the bib/packages.bib, the lines of error are:

@Manual{R-readr,
  title = {readr: Read Rectangular Text Data},
  year = {2017},
  note = {R package version 1.1.1},
  url = {https://CRAN.R-project.org/package=readr},
NA
}

@ismayc
Copy link
Member

ismayc commented Mar 18, 2018

Hi @psychelzh. Do you get a similar error when building from the master branch of the repository, i.e., the developmental version of the book?

@psychelzh
Copy link
Author

Yes. The error persists.

@ismayc
Copy link
Member

ismayc commented Mar 18, 2018

Can you comment out

knitr::write_bib(
  c(.packages(), "bookdown", "knitr", "rmarkdown", "nycflights13", "devtools", 
  "ggplot2", "webshot", "dygraphs", "tufte", "okcupiddata", "mosaic", "dplyr",
  "ggplot2movies", "fivethirtyeight", "tibble", "readr", "tidyr"), 
  "bib/packages.bib"
  )

in index.Rmd and try to build the book again?

@psychelzh
Copy link
Author

Okay. Thanks, I will have a try soon.

@psychelzh
Copy link
Author

It works while I comment out those lines suggested. Seemingly it is an issue of knitr::write_bib?

@ismayc
Copy link
Member

ismayc commented Mar 19, 2018

It appears so. Does adding

knitr::write_bib(
  c(.packages(), "bookdown", "knitr", "rmarkdown", "nycflights13", "devtools", 
  "ggplot2", "webshot", "dygraphs", "tufte", "okcupiddata", "mosaic", "dplyr",
  "ggplot2movies", "fivethirtyeight", "tibble", "readr", "tidyr"), 
  "bib/packages.bib"
  )

to the bookdown-demo also produce this error? If so, I recommend creating an issue on bookdown.

@ismayc ismayc closed this as completed Apr 7, 2018
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