sciunto-org / python-bibtexparser

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

No entry after parsing #353

Closed Pocoyo7798 closed 1 year ago

Pocoyo7798 commented 1 year ago

Hello! I´m trying to parse the following .bib file: @article{Wu_1996, doi = {10.1021/ie950473s}, url = {https://doi.org/10.1021%2Fie950473s}, year = 1996, month = {jan}, publisher = {American Chemical Society ({ACS})}, volume = {35}, number = {8}, pages = {2546--2560}, author = {Yue Wu and Xingkai Ye and Xiangguang Yang and Xinping Wang and Wenling Chu and Yucai Hu}, title = {Heterogenization of Heteropolyacids:{\hspace{0.167em}} A General Discussion on the Preparation of Supported Acid Catalysts}, journal = {Ind. Eng. Chem. Res.}amp$\mathsemicolon$ Engineering Chemistry Research} }

When I run: with open('bibtext.bib') as bibfile: info_bib = bibtexparser.load(bibfile) print (info_bib.entries) I get a blanck list. I think the problem come from '{\hspace{0.167em}}' and '.}amp$\mathsemicolon$', can someone confirm this? Theres any way to solve this?

Thanks in advance

MiWeiss commented 1 year ago

Hi

I have not tested the snippet, but at a quick look, this looks like an invalid bibtex entry, which is ignored silently: Note that the "journal" field has two closing brackets }. One after Res. and one at the end. Thus, the entry cannot be parsed.