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

Trailing comma with label causes error in parse_params #412

Closed
jstvz opened this issue Oct 28, 2012 · 2 comments
Closed

Trailing comma with label causes error in parse_params #412

jstvz opened this issue Oct 28, 2012 · 2 comments
Labels
feature Feature requests
Milestone

Comments

@jstvz
Copy link

jstvz commented Oct 28, 2012

Steps to Reproduce:

```{r cars, warning=FALSE,}
summary(cars)
```

will result in:

> options(encoding=''); require(knitr); knit('a.Rmd');
Loading required package: knitr


processing file: a.Rmd
Error in parse_params(params) : 
  all options must be of the form 'tag=value' except the chunk label
Calls: knit ... split_file -> lapply -> FUN -> parse_block -> parse_params
Execution halted

knitr terminated with status 1

NB: Using {r warning=FALSE,} doesn't produce this error.

This was in a largish document so it took a bit to track down. An error report that contains a line number such as in issues #219 and #151 would be helpful for when I neglect to split my documents.

Occurs in RStudio and using Rscript -e "library(knitr); knit('foo.Rmd')".

SessionInfo:

print(sessionInfo(), locale = FALSE)
## R version 2.15.1 (2012-06-22)
## Platform: x86_64-pc-linux-gnu (64-bit)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] knitr_0.8
## 
## loaded via a namespace (and not attached):
## [1] digest_0.5.2   evaluate_0.4.2 formatR_0.6    plyr_1.7.1    
## [5] stringr_0.6.1  tools_2.15.1

Thanks.

@yihui yihui closed this as completed in 90dccbc Oct 29, 2012
@yihui
Copy link
Owner

yihui commented Oct 29, 2012

Thanks for the report and sorry for wasting your time on this; knitr will give more detailed error messages in the future so you can see the problematic chunk options.

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

2 participants