scholarly icon indicating copy to clipboard operation
scholarly copied to clipboard

Invalid Bibtex comes back with 200 status code, causing parsing errors

Open ipeirotis opened this issue 4 years ago • 2 comments

Look at the case described at https://github.com/scholarly-python-package/scholarly/issues/268#issuecomment-790944970 and https://github.com/scholarly-python-package/scholarly/issues/268#issuecomment-800994100

ipeirotis avatar Mar 08 '21 17:03 ipeirotis

Is this related to the following as well?

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-16-cda3ef06fbcb> in <module>()
      6 scholarly.fill(publications[0],[])
      7 scholarly.pprint(publications[0])
----> 8 scholarly.bibtex(publications[0])
      9 copublications = coauthor['publications']
     10 scholarly.pprint(copublications[4])

5 frames
/usr/local/lib/python3.7/dist-packages/bibtexparser/bwriter.py in _entry_to_bibtex(self, entry)
    117         bibtex = ''
    118         # Write BibTeX key
--> 119         bibtex += '@' + entry['ENTRYTYPE'] + '{' + entry['ID']
    120 
    121         # create display_order of fields for this entry

KeyError: 'ENTRYTYPE'

jenschne avatar Apr 12 '21 19:04 jenschne

Is this related to the following as well?

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-16-cda3ef06fbcb> in <module>()
      6 scholarly.fill(publications[0],[])
      7 scholarly.pprint(publications[0])
----> 8 scholarly.bibtex(publications[0])
      9 copublications = coauthor['publications']
     10 scholarly.pprint(copublications[4])

5 frames
/usr/local/lib/python3.7/dist-packages/bibtexparser/bwriter.py in _entry_to_bibtex(self, entry)
    117         bibtex = ''
    118         # Write BibTeX key
--> 119         bibtex += '@' + entry['ENTRYTYPE'] + '{' + entry['ID']
    120 
    121         # create display_order of fields for this entry

KeyError: 'ENTRYTYPE'

I got the same issue as well, any news about this ?

gabrielctn avatar Feb 04 '22 13:02 gabrielctn