- attached refs.bib
pybtex.scanner.TokenRequired: syntax error in line 119: '}' expected
I get a missing token error '}' as in the title that is not very informative, it doesn't tell you a line number, so I can;t work out why it is happening. From running biblatex_check.py I think my bibtex is fine apart from missing fields warnings (and from some quick python there are no lines of the form " field = <something>" without a the previous line being finished by a comma).
Comments (5)
-
-
btw there's nothing wrong with the bibtex at ln 119 that comes from pybtex/scanner.py I guess
-
- changed status to invalid
This is a known issue with sphinxcontrib-bibtex:
https://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html#encoding-percent-signs
Edit: the problem is caused by the implicit usage of latexcodec in sphinxcontrib-bibtex. As a result, URLs with percent signs are parsed incorrectly. Additionally, latexcodec affects line breaks and changes line numbers, so the line 119 in the error message actually refers to the source line 999 (the
Anonymous2016-ys
entry with theurl
field containing percent signs). -
Filed a bug in sphinxcontrib-bibtex:
https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/127
-
Thanks -- escaping % in url and file fields fixes it
- Log in to comment
This is the bibtex file that didn't work