Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import fails if pdf not found #2

Open
pazz opened this issue Mar 20, 2018 · 0 comments
Open

import fails if pdf not found #2

pazz opened this issue Mar 20, 2018 · 0 comments

Comments

@pazz
Copy link
Contributor

pazz commented Mar 20, 2018

I hope It's OK to post bugs here.
I am trying to get a reasonable xapers environment set up once again and there are a few pitfalls that I'm running into. One is a crash due to unavailable files. My bibfile contains an entry with:

File                     = {HT2012.pdf:papers/HT2012.pdf:PDF}

But the file is not available (the entry was copied from an old folder).
Now xapers import publications.bib dies on me halfway through the file

...
HT2012
  Adding file: papers/HT2012.pdf
Traceback (most recent call last):
  File "/usr/bin/xapers", line 11, in <module>
    load_entry_point('xapers==0.8.2', 'console_scripts', 'xapers')()
  File "/usr/lib/python3/dist-packages/xapers/__main__.py", line 221, in main
    cli.importbib(db, bibfile, tags=tags)
  File "/usr/lib/python3/dist-packages/xapers/cli.py", line 350, in importbib
    doc.add_file(filepath)
  File "/usr/lib/python3/dist-packages/xapers/documents.py", line 263, in add_file
    with open(infile, 'br') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'papers/HT2012.pdf'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant