Add a pdf that has no doi or arxiv reference
Hello, How can I add a pdf document to the library if the paper isn't published (i.e. has no doi) and is not on arxiv?
The following returns an index error:
papis add some_file.pdf -d some_folder --set tags 'some tags'
My papis version is 0.13.
Thanks, Tom
I tried more or less the same command with a file and it seemed to work (on latest main). What error are you getting exactly?
The exact command and output are:
$ papis add ~/Downloads/Two_particle_DTRILEX.pdf -d dual_theories --set tags 'zhenya diagrams dual_theories dual_trilex'
[INFO] importer.pdf2doi: Parsed DOI 'None' from file: '/home/tom/Downloads/Two_particle_DTRILEX.pdf'.
[WARNING] importer.pdf2doi: There is no guarantee that this DOI is the correct one!
[INFO] commands.add: Created reference 'IndexerrorStringIndexOutOfRange'.
[INFO] commands.add: Document folder is '/home/tom/Papers/dual_theories/indexerror-string-index-out-of-range'.
[INFO] commands.add: Checking if this document is already in the library. This uses the keys ['doi', 'ref', 'isbn', 'isbn10', 'url', 'doc_url'] to determine uniqueness.
[INFO] database.cache: Indexing library. This might take a while...
[INFO] commands.add: No document matching the new metadata found in the 'papers' library.
[INFO] commands.add: [MV] '/tmp/tmpn73ds626' to '/home/tom/Papers/dual_theories/indexerror-string-index-out-of-range'.
I can try updating to main.
Verified on main -- same thing is happening.
Verified on
main-- same thing is happening.
Thanks for checking!
Hm, yeah, the IndexError seems to be happening somewhere and failing silently. We should add some better error reporting :(
My first guess would be that it's a problem with papis.format.format, so likely something in your configuration. Can you share what values you have set for add-file-name, ref-format, and add-folder-name?
EDIT: papis config add-file-name etc should give you the values that papis is actually using.
EDIT2: Added some more helpful debug messages in #592. If you run your command with papis --log DEBUG add <...> it should hopefully have a line that tells you which option is causing the issue (and a traceback!)