papis / papis-zotero

Zotero compatibility layer for papis
GNU General Public License v3.0
75 stars 17 forks source link

IndexError while trying to import papers from a bibtex file #12

Closed richoux closed 1 year ago

richoux commented 4 years ago

Hi there,

I have cloned this repo, installed papis-zotero (after having installed papis) and run the command papis zotero import --from-bibtex My_Collection_2020-10-20.bib -o papers upon a bibtex file generated by Mendeley and modified by hand. However, I got the following error:

Traceback (most recent call last): File "/opt/anaconda3/bin/papis", line 11, in load_entry_point('papis==0.10', 'console_scripts', 'papis')() File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/flo/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/opt/anaconda3/lib/python3.6/site-packages/papis_zotero-0.1.0-py3.6.egg/papis_zotero/init.py", line 78, in do_importer File "/opt/anaconda3/lib/python3.6/site-packages/papis_zotero-0.1.0-py3.6.egg/papis_zotero/bibtex.py", line 54, in add_from_bibtex IndexError: list index out of range

//////////

Here is my config file: [settings] default-library = papers # Use ranger as a file browser, a nice python program file-browser = ranger # Ask for confirmation when doing papis add add-confirm = True # Edit the info.yaml file before adding a doc into the library # papis add --edit add-edit = True # Open the files before adding a document into the library # papis add --open add-open = True

[tui] editmode = emacs

[papers] dir = ~/Seafile/Papers/.papis

//////////

Any help is welcome!

alejandrogallo commented 4 years ago

that's weird, I'll check it out. In future I want to stop using papis-zotero to import from a bib file, I just implemented a command in papis master to do this with the bibtex command, maybe you can check it out?

It's related to this issue

https://github.com/papis/papis/issues/281

In the meantime I'll try to fix this issue

alexfikl commented 1 year ago

There have been a lot of changes around the BibTeX implementation in both papis and papis-zotero, so not sure if this bug still exists. Feel free to reopen if it's still an issue!