2

I cannot knit any papaja files. Whenever I try I get this error:

[WARNING] Deprecated: pandoc-citeproc filter. Use --citeproc instead. pandoc-citeproc: Error in $: Incompatible API versions: encoded with [1,22] but attempted to decode with [1,21]. CallStack (from HasCallStack): error, called at ./Text/Pandoc/JSON.hs:112:48 in pandoc-types-1.21-LpPdBV1sPudK4kVghsVxWs:Text.Pandoc.JSON Error running filter pandoc-citeproc: Filter returned error status 1 Error: pandoc document conversion failed with error 83 Execution halted

I am using: R version 4.0.3 R Studio version 1.4.1013 RMarkdown version 2.5.3 papaja version 0.1.0.9997

I'm new to R so sorry if this is a silly question.

PCS
  • 21
  • 2
  • Did you try to ask a Google about that? First result is [from RStudio forum](https://community.rstudio.com/t/papaja-rmd-knit-problem-with-error-pandoc-document-conversion-failed-with-error-83/86818/3). – astentx Nov 19 '20 at 11:10
  • I did and did find that question but I've been battling with this for several days now. Although I checked back a lot of times to see if that had been answered, it must have been longer than I thought since I last checked as I see it's now been answered. That's super helpful. Thanks. The answer links to Github (https://github.com/crsh/papaja/issues/427#issuecomment-729030996) and I've been trying to decipher what that says. Is it basically saying that I need to wait for it to be fixed in the papaja package and there's no work around? Sorry to be dim but it got very confusing towards the end. – PCS Nov 19 '20 at 14:03
  • I'm having the same problem. It is easy to replicate, at least with my setup: Make a new R Markdown document with the papaja template, then try to knit it. `knitr` knits the document but does not produce the end result, and gives the error message indicated. Knitting the same document after substituting `output: papaja::apa6_pdf` with `output: pdf_document` gives no error (but not the result we want). – cibr Nov 20 '20 at 07:35
  • I guess we should be patient and it will be resolved. The developer of pajaja wrote 3 days on the page linked to in PCS's comment: "I understand that this result may be frustrating to you, but I'm delighted about it. It means that the problem is not with papaja per se (although I need to update the package to make it compatible with citeproc), but with the pandoc-citeproc binary distributed with the RStudio preview release. I'll try to pass this issue along tonight." (I too use the RStudio preview release.) – cibr Nov 20 '20 at 07:54

2 Answers2

3

With version 2.11, pandoc has deprecated the pandoc-citeproc filter, which caused some trouble with version 0.1.2 of the rmdfiltr package that papaja relies on.

The issue should be resolved by installing version >= 0.1.3 of the rmdfiltr package which is now readily available from CRAN via

install.packages("rmdfiltr")
Marius Barth
  • 596
  • 2
  • 9
0

I ran into this issue as well -- same R, RStudio, rmarkdown, and papaja version. To add, I'm using pandoc version 2.11.0.2.

It looks like there's been some progress since this post and subsequent comments. I was able to get my document to knit by installing the rmdfiltr package per this comment: https://github.com/crsh/papaja/issues/427#issuecomment-731730225

remotes::install_github("crsh/rmdfiltr")