Replies: 1 comment
-
@wjin33 This is an error from Python's bibtexparser library being unable to parse the Bibtex you provided due to unusual characters appearing in the file. Have you tried removing any Latex encoding within the file so it is purely standard plain text Bibtex? It will likely work once it is in a more standard Bibtex format. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am new to Hugo-blox, would like to build my Lab pages, but I am not able to parse my BibTeX files into the correct files in content/publications, following the steps here https://docs.hugoblox.com/tutorial/resume/step-3/. Anyone had the same error?
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.11/x64/bin/academic", line 7, in
sys.exit(main())
^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/academic/cli.py", line 22, in main
parse_args(sys.argv[1:])
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/academic/cli.py", line 71, in parse_args
import_bibtex(
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/academic/import_bibtex.py", line 41, in import_bibtex
bib_database = bibtexparser.load(bibtex_file, parser=parser)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/init.py", line 69, in load
return parser.parse_file(bibtex_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/bparser.py", line 184, in parse_file
return self.parse(file.read(), partial=partial)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/bparser.py", line 162, in parse
self._expr.parseFile(bibtex_file_obj)
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/bibtexexpression.py", line 278, in parseFile
return self.main_expression.parseFile(file_obj, parseAll=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/util.py", line 436, in _inner
return fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 2203, in parse_file
return self.parse_string(file_contents, parseAll)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 1306, in parse_string
loc, tokens = self._parse(instring, 0)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 933, in _parseNoCache
loc, tokens = self.parseImpl(instring, pre_loc, do_actions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 5593, in parseImpl
return super().parseImpl(instring, loc, do_actions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 5489, in parseImpl
loc, tmptokens = self_expr_parse(instring, preloc, do_actions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 933, in _parseNoCache
loc, tokens = self.parseImpl(instring, pre_loc, do_actions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 4753, in parseImpl
return e._parse(instring, loc, do_actions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 972, in _parseNoCache
tokens = fn(instring, tokens_start, ret_tokens) # type: ignore [call-arg, arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyparsing/core.py", line 280, in wrapper
return func(*args[limit:])
^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/bparser.py", line 202, in
lambda s, l, t: self._add_entry(
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/bparser.py", line 302, in _add_entry
d = self.customization(d)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/customization.py", line 587, in convert_to_unicode
record[val] = latex_to_unicode(record[val])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/latexenc.py", line 65, in latex_to_unicode
string = _replace_all_latex(string, itertools.chain(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/latexenc.py", line 53, in _replace_all_latex
string = _replace_latex(string, l.rstrip(), u)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/bibtexparser/latexenc.py", line 35, in _replace_latex
if unicodedata.combining(unicod):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: combining() argument must be a unicode character, not str
Beta Was this translation helpful? Give feedback.
All reactions