quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.62k stars 296 forks source link

Make CSL date parsing more robust #8362

Closed cscheid closed 6 months ago

cscheid commented 6 months ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/8360

Originally posted by **cmadland** January 19, 2024 ### Description I'm new to Quarto, but have used Bookdown quite extensively. I'm editing the manuscript template in VS Code and when I render the project, I get this error: ``` ERROR: TypeError: Cannot read properties of undefined (reading 'map') Stack trace: at cslDateToEDTFDate (file:///Applications/quarto/bin/quarto.js:68330:51) at googleScholarMeta (file:///Applications/quarto/bin/quarto.js:92446:28) at file:///Applications/quarto/bin/quarto.js:92543:30 at Array.forEach () at googleScholarReferences (file:///Applications/quarto/bin/quarto.js:92542:20) at eventLoopTick (ext:core/01_core.js:183:11) at async file:///Applications/quarto/bin/quarto.js:92402:39 at async file:///Applications/quarto/bin/quarto.js:70237:33 at async withTimingAsync (file:///Applications/quarto/bin/quarto.js:19466:25) at async runHtmlPostprocessors (file:///Applications/quarto/bin/quarto.js:70230:9) ``` Frontmatter: ``` --- title: Validation of the Technology-Integrated Assessment Framework author: - name: Colin Madland orcid: 0000-0002-1761-1903 corresponding: true email: cmadland@uvic.ca roles: - Investigation - Project administration - Software - Visualization affiliations: - University of Victoria - name: Valerie Irvine orcid: 0000-0002-8067-1300 corresponding: false roles: [] affiliations: - University of Victoria - name: Okan Bulut orcid: 0000-0001-5853-1267 corresponding: false roles: [] affiliations: - University of Alberta - name: Christopher DeLuca orcid: 0000-0001-5962-0827 corresponding: false roles: [] affiliations: - Queen's University keywords: - technology - assessment - technology-integrated assessment framework - higher education abstract: | In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ... plain-language-summary: | Earthquake data for the island of La Palma from the September 2021 eruption is found ... key-points: - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs. date: last-modified bibliography: references.bib citation: container-title: Earth and Space Science number-sections: true jupyter: python3 --- ``` _quarto.yml ``` project: type: manuscript execute: freeze: auto format: html: toc: true comments: hypothesis: true docx: default jats: default pdf: default ``` [EDIT] Can anyone help me resolve this error? It occurs after the render process stalling on `Executing 'index.ipynb'`
cscheid commented 6 months ago

Here's a minimal repro:

bad.bib:

@book{hootsteinWearingFourPairs2012,
  title = {Wearing Four Pairs of Shoes: {{The}} Roles of e-Learning Facilitators},
  author = {Hootstein, Ed},
  year = {August 16, 2012 2002},
  publisher = {{American Society for Training and Development}},
  abstract = {The emergence of e-learning comes at a time when education and training are undergoing important transformations. The teacher-centered model that has dominated instruction for centuries is slowly giving way to a learner-centered model with instructors in the roles of facilitators or "guides on the side." E-learning is no exception. But e-learning's use doesn't preclude facilitators' responsibilities for structuring learning experiences. The effectiveness and success of e-learning programs are dependent on facilitators' roles in delivering and managing instruction. One of the leading conceptualizers in the field of distance learning, Zane Berge, broke down an instructor's role in computer conferencing into four separate parts. I propose a similar model, in which an e-learning facilitator "wears four pairs of shoes"{\textendash}acting as instructor, social director, program manager, and technical assistant.}
}

bad.qmd:

---
format: html
bibliography: bad.bib
google-scholar: true
nocite: |
  @*
---

## Hello.

### References

::: {#refs}
:::

It's a bug in Quarto. We'll fix soon.

Susana465 commented 5 months ago

Hi,

I am having exactly the same issue as described by cscheid (as of Jan 22, 2024). Is there a way to resolve this or around this?

dragonstyle commented 5 months ago

This is fixed in our 1.5 pre-release, so one approach would be to use that version. If you'd like to stay on the release, your best bet is to actually fix the bibliography entry (this is caused by invalid dates in your bibliography).