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

attempt to index a nil value (pandoc error 83) #585

Open
HenrikEckermann opened this issue Mar 24, 2024 · 4 comments
Open

attempt to index a nil value (pandoc error 83) #585

HenrikEckermann opened this issue Mar 24, 2024 · 4 comments

Comments

@HenrikEckermann
Copy link

Describe the bug

If I try to include a table from the package table1, I receive the error printed below. I first convert the table to a kable object using as.data.frame(tbl1) %>% kable(). I can knit the document to word, pdf or html without any issues. Only when I knit using the index.Rmd file with papaja do I get the error. Other tables from a different format seem not cause the issue with papaja but only this specific table. Any ideas what could be causing this and how I can solve it?

Error running filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/papaja/lua/docx_fixes.lua:
...ns/4.3-arm64/Resources/library/papaja/lua/docx_fixes.lua:24: attempt to index a nil value (field 'integer index')
stack traceback:
Error: pandoc document conversion failed with error 83
Execution halted

Unfortunately, I cannot share this specific document for reproducibility.

@crsh
Copy link
Owner

crsh commented Apr 2, 2024

Hi Henrik, can you share (a anonymized version of) the YAML front matter?

@HenrikEckermann
Copy link
Author

Hi Frederik,

see below

---
title             : "A title"
shorttitle        : "A title"

author: 
  - name          : "Henrik Eckermann"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address        : "Donders Institute for Brain, Cognition and Behavior, Kapittelweg 29, 6525EN Nijmegen, The Netherlands" 
    email         : "myemail"
    role:         # Contributorship roles (e.g., CRediT, https://casrai.org/credit/)
      - "Original Draft Preparation"
      - "Data Analysis"
      - "Review & Editing"
      
  - name          : "name of colleague"
    affiliation   : "1"
    role:
      - "Conceptualization"
      - "Data Collection"
      - "Review & Editing"

  - name          : "Another colleague"
    affiliation   : "2"
    role:
      - "Supervision"
      - "Review & Editing"
  - name          : "Another colleguage"
    affiliation   : "1"
    role:
      - "Conceptualization"
      - "Review & Editing"
      - "Supervision"

affiliation:
  - id            : "1"
    institution   : "Radboud university medical center, Donders Institute for Brain, Cognition and Behaviour, Department of Cognitive Neuroscience, Nijmegen, The Netherlands"
  - id            : "2"
    institution   : "Institute of my colleague"


abstract: |
  my abstact



  
keywords          : "Some keywords"
wordcount         : "323"

csl               : "bib/gut-microbes.csl"
bibliography      : "bib/final.bib"

floatsintext      : no
linenumbers       : yes
draft             : no
mask              : no

figurelist        : yes
tablelist         : yes
footnotelist      : no

classoption       : "man"
output            : papaja::apa6_docx
---

@sebsilas
Copy link

sebsilas commented Apr 10, 2024

I am also receiving this error when I try to knit to Word in the usual way that works for me.

I've knitted the same paper before many times with no issue. I made a few small updates today after leaving it in a drawer for a few months, and now I experience the error.

I suspect it is to do with a package update.

@sebsilas
Copy link

Yup, just to confirm I rolled back papaja to v 0.1.0 and I no longer experience the rendering error.

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

3 participants