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

biber fails due to year entry in the bib file #312

Closed
xu-cheng opened this issue Apr 18, 2020 · 8 comments
Closed

biber fails due to year entry in the bib file #312

xu-cheng opened this issue Apr 18, 2020 · 8 comments

Comments

@xu-cheng
Copy link

MWE:

\documentclass{article}
\begin{filecontents}{test.bib}
@book{key,
  author = {Name},
  title = {Title},
  year = {2020},
}
\end{filecontents}

\usepackage[backend=biber]{biblatex}
\addbibresource{test.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Log:

$ latexmk -pdf test
<snip>
=== TeX engine is 'pdfTeX'
Latexmk: Non-existent bbl file 'test.bbl'
 No file test.bbl.
Latexmk: Log file says no output from latex
Latexmk: For rule 'pdflatex', no output was made
Latexmk: applying rule 'biber test'...
Rule 'biber test': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'test.bcf'
------------
Run number 1 of rule 'biber test'
------------
------------
Running 'biber  "test"'
------------
INFO - This is Biber 2.14
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
INFO - Using all citekeys in bib section 0
INFO - Processing section 0
INFO - Globbing data source 'test.bib'
INFO - Globbed data source 'test.bib' to test.bib
INFO - Looking for bibtex format file 'test.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'test.bib'
Latexmk: Found biber source file(s) [test.bcf test.bib]
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  biber test: Command for 'biber test' gave return code 2
  pdflatex: failed to create output file
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.

test.blg file:

[0] Config.pm:304> INFO - This is Biber 2.14
[0] Config.pm:307> INFO - Logfile is 'test.blg'
[87] biber-darwin:322> INFO - === Fri Apr 17, 2020, 23:00:47
[101] Biber.pm:415> INFO - Reading 'test.bcf'
[203] Biber.pm:940> INFO - Using all citekeys in bib section 0
[219] Biber.pm:4256> INFO - Processing section 0
[220] Utils.pm:75> INFO - Globbing data source 'test.bib'
[220] Utils.pm:91> INFO - Globbed data source 'test.bib' to test.bib
[231] Biber.pm:4455> INFO - Looking for bibtex format file 'test.bib' for section 0
[233] bibtex.pm:1653> INFO - LaTeX decoding ...
[241] bibtex.pm:1471> INFO - Found BibTeX data source 'test.bib'

This issue happens after I upgrade to MacTeX 2020. If I remove year = {2020}, it works fine. It is also fine when using TeXLive 2019.

@krumeich
Copy link
Collaborator

It seems that there is a trailing comma at the end of the "year" field. I always have trouble with trailing/missing commas. Maybe try removing that for a start.

@xu-cheng
Copy link
Author

The trailing comma is perfectly legal. This is a regression since it works fine for texlive 2019.

@moewew
Copy link
Contributor

moewew commented Apr 18, 2020

The trailing comma is fine (or at least: it should be).

I ran your example could not reproduce an error.

Please run the example in a new, empty folder (to make sure that test.bib is indeed the file from the filecontents environment in the MWE and not a pre-existing file). Ideally you would run the sequence

pdflatex doc
biber doc
pdflatex doc
pdflatex doc

manually (without latexmk's) help.

Do you get any errors or warnings from LaTeX/Biber? Can you upload the .bbl file?

@xu-cheng
Copy link
Author

$ ls
test.bib  test.tex

$ cat test.bib
@book{key,
  author = {Name},
  title = {Title},
  year = {2020},
}

$ cat test.tex
\documentclass{article}

\usepackage[backend=biber]{biblatex}
\addbibresource{test.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

$ pdflatex test
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-04-06>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/biblatex.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/blx-dm.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/blx-compat.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/biblatex.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/bbx/standard.bbx))
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/biblatex.cfg))
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def)
No file test.aux.
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/lbx/english.lbx)
No file test.bbl.

LaTeX Warning: Empty bibliography on input line 8.

(./test.aux)

LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                test
(biblatex)                and rerun LaTeX afterwards.

 )
No pages of output.
Transcript written on test.log.

$ biber test
INFO - This is Biber 2.14
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
INFO - Using all citekeys in bib section 0
INFO - Processing section 0
INFO - Globbing data source 'test.bib'
INFO - Globbed data source 'test.bib' to test.bib
INFO - Looking for bibtex format file 'test.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'test.bib'

$ echo $?
2

The .bbl file is an empty file.

@moewew
Copy link
Contributor

moewew commented Apr 18, 2020

Hmmm, your example works fine on my Windows machine. I'm just firing up my virtual machine with Ubuntu, but I need to install TeX live 2020 first, so it will take a while. I don't have access to a Mac, so won't be able to test.

Not that I have high hopes that it works, but could you try removing the Biber cache and rerun Biber? (The first Biber run after the cache has been deleted will be much longer than usual, because Biber needs to unpack itself into the cache. Do not abort this run as that may lead to a corrupted cache once again.) See https://tex.stackexchange.com/q/140814.

edit No problem with TeX live 2020 on Ubuntu 14.04 (32bit) or Ubuntu 18.04 (64bit).

@xu-cheng
Copy link
Author

Not that I have high hopes that it works, but could you try removing the Biber cache and rerun Biber?

This solves my problem. Thanks.

@alexreg
Copy link

alexreg commented Jan 18, 2021

I ran into this exact same error, except that removing the cache does not fix it. Definitely seems like a bug here somewhere...

@alexreg
Copy link

alexreg commented Jan 18, 2021

Okay, I solved this by deleting the Biber cache then rerunning. In case anyone happens to run into this issue like me, just do this from the shell:

rm -Rf "$(biber --cache)"
# Rerun build.

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

4 participants