hayagriva icon indicating copy to clipboard operation
hayagriva copied to clipboard

data did not match any variant of untagged enum OneOrMany

Open ernieIzde8ski opened this issue 4 months ago • 0 comments

Hi, I'm filing an issue because although I spotted my syntax error, the error message is unhelpful:

  milkmoney:
    type: Video
    title: "Milk Money"
    # ...
    parent:
      title: "Rotten"
-     publisher: ["Zero Point Zero Production", "Netflix"]
+     publisher: Zero Point Zero Production; Netflix

This syntax is in line with the syntax for author, names, editor, and I don't know what else, so it's an easy mistake to make. The error also doesn't point to an obvious answer—no idea why it says line 2, column 3, which is where type is.

[1] ernie@vivec::factchecking% ~/.local/share/cargo/bin/typst compile milk-money-review.typ
error: failed to parse YAML (milkmoney: data did not match any variant of untagged enum OneOrMany at line 2 column 3)
   ┌─ milk-money-review.typ:89:14
   │
89 │ #bibliography("milk-money-bibliography.yml", full: true)
   │               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Process exited with code 1
[1] ernie@vivec::factchecking% ~/.local/share/cargo/bin/typst --version
typst 0.11.1 (unknown hash)

typst was installed today via cargo install --locked typst-cli

ernieIzde8ski avatar Oct 16 '24 17:10 ernieIzde8ski