bibtextomd
bibtextomd copied to clipboard
Script does not work
Hey,
Your script does not work for me :( I installed it using:
setup.py install
and then I tried to execute the following command:
py -m bibtextomd -b refs.bib -o tst.html
where refs.bib
is bib file from test
folder in this repository. After executing the above command I got the following output:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 102, in expand_string
self.strings[name])
KeyError: 'aug'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\tomasz\desktop\bibtextomd-master\bibtextomd\__main__.py", line 13, in <module>
main()
File "c:\users\tomasz\desktop\bibtextomd-master\bibtextomd\__main__.py", line 10, in main
bib_main(args)
File "c:\users\tomasz\desktop\bibtextomd-master\bibtextomd\bib.py", line 363, in main
sort_dict = load_bibtex(bib_file_name)
File "c:\users\tomasz\desktop\bibtextomd-master\bibtextomd\bib.py", line 303, in load_bibtex
bp = BibTexParser(bib_file.read(), customization=convert_to_unicode)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bparser.py", line 75, in __new__
return parse(data, **args)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bparser.py", line 31, in parse
return parser.parse(data)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bparser.py", line 147, in parse
self._expr.parseFile(bibtex_file_obj)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibtexexpression.py", line 263, in parseFile
return self.main_expression.parseFile(file_obj, parseAll=True)
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 2207, in parseFile
return self.parseString(file_contents, parseAll)
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1666, in parseString
loc, tokens = self._parse( instring, 0 )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 4094, in parseImpl
return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 4023, in parseImpl
loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3618, in parseImpl
ret = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3483, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3618, in parseImpl
ret = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3483, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3483, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 4094, in parseImpl
return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 4033, in parseImpl
loc, tmptokens = self_expr_parse( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3483, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3805, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3483, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1412, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 3618, in parseImpl
ret = e._parse( instring, loc, doActions )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1445, in _parseNoCache
tokens = fn( instring, tokensStart, retTokens )
File "C:\Program Files\Python37\lib\site-packages\pyparsing.py", line 1082, in wrapper
ret = func(*args[limit[0]:])
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibtexexpression.py", line 260, in _string_expr_parse_action
return self._string_expr_parse_action_fun(s, l, t)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bparser.py", line 184, in <lambda>
BibDataStringExpression.expression_if_needed(t)))
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bparser.py", line 178, in <lambda>
maybe_interpolate = lambda expr: as_text(expr)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 223, in as_text
return text_string_or_expression.get_value()
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 184, in get_value
return ''.join([BibDataString.expand_string(s) for s in self.expr])
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 184, in <listcomp> return ''.join([BibDataString.expand_string(s) for s in self.expr])
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 150, in expand_string
return string_or_bibdatastring.get_value()
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 131, in get_value
return self._bibdatabase.expand_string(self.name)
File "C:\Program Files\Python37\lib\site-packages\bibtexparser\bibdatabase.py", line 104, in expand_string
raise(UndefinedString(name))
bibtexparser.bibdatabase.UndefinedString: 'aug'
Do you know what might be wrong? Do I do something wrong?
I am using Windows 10 and Python 3.7.
Most likely the problem is a newer version of bibtexparser
since I released this. Try pip install bibtexparser==0.6.2
.
I'm going to reopen this so that I remember to either fix this or properly constrain the dependency version in setup.py