sciunto-org / python-bibtexparser

Bibtex parser for Python 3
https://bibtexparser.readthedocs.io
MIT License
473 stars 131 forks source link

@string not accepting hypen #147

Closed dotnwat closed 7 years ago

dotnwat commented 7 years ago

I'm trying to parse the following bibtex file, which is accepted by at least the BibDesk manager and the standard bibtex tool:

@string{pub-ieee-std = {IEEE}}

but is rejected by python-bibtexparser with the following error:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    bib_database = bibtexparser.load(bibtex_file, parser)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/__init__.py", line 69, in load
    return parser.parse_file(bibtex_file)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/bparser.py", line 148, in parse_file
    return self.parse(file.read(), partial=partial)
  File "/Users/nwatkins/src/bibthing/env/lib/python2.7/site-packages/bibtexparser/bparser.py", line 134, in parse
    raise exc
pyparsing.ParseException: Expected end of text (at char 0), (line:1, col:1)
dotnwat commented 7 years ago

This and another issue are fixed in #148