pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

Error: pandoc document conversion failed with error 83 #235

Closed mmace3 closed 2 years ago

mmace3 commented 2 years ago

Hi, I'm not sure if this has to do with the scholarly-metadata.lua or author-info-blocks.lua files directly, but I recently updated my R and R studio versions and a file that was working fine is now giving an error. Below is a simple example that gives the error

Error running filter author-info-blocks.lua:
author-info-blocks.lua:100: bad argument #2 to '__concat' (table expected, got nil)
stack traceback:
    author-info-blocks.lua:100: in function <author-info-blocks.lua:95>
    [C]: in function 'pandoc.List.map'
    author-info-blocks.lua:94: in upvalue 'create_affiliations_blocks'
    author-info-blocks.lua:160: in function <author-info-blocks.lua:153>
Error: pandoc document conversion failed with error 83
Execution halted

Below is the code I ran to get this error:

---
title: "My title"
author:
- name: First Last
  email: firstlast@college.edu
  institute: [col]
  number: 1
institute:
  col: College A and M
output:
  pdf_document: 
    pandoc_args:
       - '--lua-filter=scholarly-metadata.lua'
       - '--lua-filter=author-info-blocks.lua'
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

Abstract

This is an abstract


I am using rmarkdown to create documents, which uses pandoc. When I want to create a document I just hit the `knit` button in R studio. So when I opened up a file containing the code above and hit the knit button, I got the error above.

Here is the result of calling `print(sessionInfo(), locale = FALSE)`

R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 16299)

Matrix products: default

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

loaded via a namespace (and not attached): [1] compiler_4.2.0 fastmap_1.1.0 cli_3.3.0 htmltools_0.5.2 tools_4.2.0 yaml_2.3.5
[7] rmarkdown_2.14 knitr_1.39 xfun_0.31 digest_0.6.29 rlang_1.0.2 evaluate_0.15


And the result of `rmarkdown::pandoc_version()`

‘2.17.1.1’



Please let me know if there is any other information that would be useful in trying to fix this issue.
Thanks
mmace3 commented 2 years ago

I think there was an issue with the scholarly-metadata.lua or author-info-blocks.lua files I was using because I copied and pasted the content of those files yesterday from the repository and then there was no error.