openjournals / openjournals-draft-action

Experimental GitHub Action
MIT License
49 stars 12 forks source link

Error running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua: Cannot get Attr from TypeNil #20

Closed paulbrodersen closed 1 year ago

paulbrodersen commented 1 year ago

Hi, I am preparing a submission to JOSS. I have already resolved a few issues that came up during compilation. However, the error message that I am stuck on now is so cryptic that I am at a loss:

Run openjournals/openjournals-draft-action@master
  with:
    journal: joss
    paper-path: publication/paper.md
/usr/bin/docker run --name openjournalsinaralatest_b6fbae --label a5c76b --workdir /github/workspace --rm -e "INPUT_JOURNAL" -e "INPUT_PAPER-PATH" -e "GIT_SHA" -e "JOURNAL" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/netgraph/netgraph":"/github/workspace" openjournals/inara:latest  "-o pdf" "publication/paper.md"
[INFO] Running filter /usr/local/share/openjournals/data/filters/parse-latex.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/parse-latex.lua in 7 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua
[INFO] Loaded paper.bib from paper.bib
[INFO] Completed filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua in 5 ms
[INFO] Running filter citeproc
[INFO] Loaded apa.csl from /usr/local/share/openjournals/apa.csl
[INFO] Completed filter citeproc in 49 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua
Error running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua:
Cannot get Attr from TypeNil
stack traceback:
    ...l/share/openjournals/data/filters/normalize-metadata.lua:95: in function 'Meta'

Any ideas what I might try to resolve the issue would be appreciated.

Link to the github actions report Link to paper.md

paulbrodersen commented 1 year ago

I had extra minus signs in the meta data. In case anybody comes across the same issue:

Incorrect:

authors:
  - name: Paul J. N. Brodersen
  - orcid: 0000-0001-5216-7863
  - affiliation: 1

Correct:

authors:
  - name: Paul J. N. Brodersen
    orcid: 0000-0001-5216-7863
    affiliation: 1
shayandavoodii commented 5 months ago

Are you sure the problem was with the extra -? I doubt it because I have no extra -s but I get the same error https://github.com/openjournals/openjournals-draft-action/issues/28

title = OnlinePortfolioSelection.jl: A package for Online Portfolio Selection algorithms in Julia
tags:
  - Julia
  - Online Portfolio Selection
  - Algorithm Trading
  - Machine Learning
authors:
  - name: Shayan Davoodi
    orcid: 0000-0002-7358-0443
    affiliation: 1
  - name: Akbar Esfahanipour
    corresponding: true
    affiliation: 1
affiliations:
  - name: Department of Industrial Engineering and Management Systems, Amirkabir University of Technology (Tehran Polytechnic), 424 Hafez Ave., Tehran 15916-34311, Iran
    index: 1
date: 21 February 2024
bibliography: paper.bib

I got it, the problem is with the = character in front of the title. Replaced by : and solved. Furthermore, the : char in front of OnlinePortfolioSelection.jl is false and causes another error. So, it should be removed. (This link helped me in this regard.)