2

I am getting the above error whenever I try to compile my text and I just don't understand why it happens. The error occurs for every single \autocite command as well as at the end at \printbibliography[title=Literaturverzeichnis], once per unique entry in the bibliography. I am using a fresh MikTeX installation with installing packages on-the-fly enabled as I recently upgraded to Windows 10. Something seems to be wrong with my bibliography.bib

I haven't included any text snippets here because my colleague was able to compile the exact same text just fine. The error has to be somewhere in my MikTeX configuration because I am getting the same error with multiple editors. I am using biblatex with Biber and configured the editors to do so.

I really run out of ideas on how to fix this error. Does anyone had a similar issue in the past and has an idea on how to fix it?

As requested, here is some text.

master.tex

\documentclass[
12pt,
BCOR=5mm,
DIV=12,
headinclude=on,
footinclude=off,
parskip=half,
bibliography=totoc,
listof=entryprefix,
toc=listof,
pointlessnumbers,
plainfootsepline]{scrreprt}

\input{config}

\begin{document}
\input{example}
\ihead{}
\printbibliography[title=Literaturverzeichnis]
\cleardoublepage
\end{document}

Now, my config.tex:

% !TEX root =  master.tex
\usepackage[backend=biber, style=apa]{biblatex}     
\DeclareLanguageMapping{german}{german-apa}

\DefineBibliographyStrings{ngerman}{  %Change u.a. to et al. (german only!)
    andothers = {{et\,al\adddot}},
}
\setlength{\bibparsep}{\parskip}        %add some space between biblatex entries in the bibliography
\addbibresource{bibliography.bib}   %Add file bibliography.bib as biblatex resource

Lastly, my example chapter and the entry in my .bib file

% !TEX root =  master.tex
\chapter{Error}

This is an example error \autocite[]{Example}.


@Inbook{Example,
author="Various",
title="Example book",
year="2019"
}

The exact error message is this:

! Package keyval Error: uniquename undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.97 ...ntbibliography[title=Literaturverzeichnis]
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
moewe
  • 175,683

1 Answers1

2

The following only slightly simplified MWE does not reproduce the error described in the question

\documentclass{scrreprt}

\usepackage[backend=biber, style=apa]{biblatex}     
\DeclareLanguageMapping{german}{german-apa}

\DefineBibliographyStrings{ngerman}{  %Change u.a. to et al. (german only!)
    andothers = {{et\,al\adddot}},
}
\setlength{\bibparsep}{\parskip}        %add some space between biblatex entries in the bibliography

\begin{filecontents}{\jobname.bib}
@Inbook{Example,
author="Various",
title="Example book",
year="2019"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\chapter{Error}

This is an example error \autocite[]{Example}.
\printbibliography[title=Literaturverzeichnis]
\cleardoublepage
\end{document}

Try running it in a new, empty folder to see if you can reproduce the issue.


The error from the question would be consistent with the result one would get from running a current version of biblatex on a document with temporary files (in particular the .bbl file) produced by an older version of Biber. If your system is fully updated it may be enough to simply remove all temporary files (.aux, .bbl, .bcf, ...) and recompile with the full LaTeX, Biber, LaTeX, LaTeX cycle.

moewe
  • 175,683
  • 1
    I also ran into this problem -- deleting the temp files is the way to go, but it's not at all obvious in this case because a working document suddenly 'breaks' on the next compile after updating (in my case) TeXLive. – Livius Dec 04 '19 at 17:44
  • @Livius Deleting aux files should definitely be on the list of things to try if things start going wrong in your document (all of a sudden or otherwise). Bad code can stick around in auxiliary files much longer than one might expect (for example if you have a typo in the .bib file it may take a while unitl the .bbl file is clean), aux files can get corrupted by errors in previous runs or package updates or other code changes can invalidate parts of the aux file contents. ... – moewe Dec 04 '19 at 20:10
  • ... Thanks to the inherently transient nature of the temporary files it is much more acceptable to change code involving the aux file in (strictly speaking) backwards compatible ways, since issues like that are resolved by deleting the aux files and recompiling. It is not always easy to make certain changes without changing any of the user interface, so imagine how hard it is to keep even temporary/internal macros stable. – moewe Dec 04 '19 at 20:12