Report ID 800927781: Importing Calibre-generated Bibtex file failed

... and no records were imported. I chose to import into a new Zotero collection, and Calibre is v5.8.1.

Getting this to work would be nice; does the report give any clues as to what I am doing wrong?

Thanks,
Felix.
  • would you mind posting/uploading the bibtex file somewhere? I don't have access to the error reports, but it's going to be difficult to debug this without the input anyway
  • Hi Adam,

    thank you! My initial hope was an answer along the lines of "you dummy, just check _that_ box!", but since that clearly was not meant to be, I also looked just a little bit more closely. Here is a Bibtex file as generated by Calibre, minus a few file paths and notes and so on. It only contains a single book entry:

    ---8<-----bibsingle.bib-----
    @preamble{"This catalog of 1 entries was generated by calibre on Monday, 28. December 2020 21:09"}

    @book{Dret2016,
    title = "Partial Differential Equations",
    title_sort = "Partial Differential Equations",
    author_sort = "Dret, Hervé Le \& Lucquin, Brigitte",
    author = "Hervé Le Dret and Brigitte Lucquin",
    formats = "pdf",
    calibreid = "771",
    isbn = "978-33-1927-067-8",
    library_name = "books-texts",
    year = "2016",
    month = "Feb",
    publisher = "Springer",
    volume = "1",
    size = "9286939 octets",
    tags = "Math.Calc, Math.DE, Text",
    timestamp = "2018-02-19",
    uuid = "266bb4d6-58c6-4237-bb14-11c59193172e",
    languages = "eng",
    identifiers = "isbn:9783319270678,google:IJWRCwAAQBAJ" }
    --->8-----

    And here is the relevant part of error text that Zotero allows me to receive:

    ---8<-----error-text-----
    [JavaScript Error: "XML Parsing Error: not well-formed
    Location: moz-nullprincipal:{034fc76d-f9db-4308-acef-0bdc06a543bf}
    Line Number 1, Column 1:" {file: "moz-nullprincipal:{034fc76d-f9db-4308-acef-0bdc06a543bf}" line: 1 column: 1 source: "@preamble{"This catalog of 1 entries was generated by calibre on Monday, 28. December 2020 21:03"}"}]
    --->8-----

    I am the first to admit that the error messages are, on the face of it, perfectly correct, as a BiBtex-format file is indeed not well-formed XML, but it's not supposed to be.

    Be that as it may, Zotero dislikes the "@preamble" clause. Removing it led to an instant success; now I just have to figure out how to get Zotero to import more than just title, authors, isbn, publisher, pub. date, and the comment. No path to any file, no tags (), call numbers and so on.

    So I'll go and play some more with this. Thank you for nudging me, the problem turned out to be far less complex than I had feared!

    F.
  • Created a ticket for the preamble problem:
    https://github.com/zotero/translators/issues/2318

    The rest looks like it's mainly Calibre exporting non-standard bibtex fields that Zotero doesn't understand. You can customize Zotero's bibtex import to understand more of these if you want to and know some basic javascript (it's fairly low-tech, so very basic js is really all you need)
    https://www.zotero.org/support/dev/translators/coding
  • Hi!

    Thanks for having opened the bug, and for the pointer to tweaking Zotero's translators—I'll give that a try!

    F.
  • BBT imports this without issue
Sign In or Register to comment.