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

author without affiliation extraction error #7

Closed
krzysztof opened this issue Aug 9, 2017 · 0 comments · Fixed by #8
Closed

author without affiliation extraction error #7

krzysztof opened this issue Aug 9, 2017 · 0 comments · Fixed by #8
Assignees

Comments

@krzysztof
Copy link
Member

This line can fail if 'author' is in 'r' but affiliation list is empty:
https://github.com/inveniosoftware/invenio-files-processor/blob/master/invenio_files_processor/processors/pdf_grobid.py#L66

Traceback (most recent call last):
  File "/home/krnowak/src/invenio-files-processor/invenio_files_processor/views.py", line 55, in extract_pdf_metadata
    metadata = processor.process(object_version)
  File "/home/krnowak/src/invenio-files-processor/invenio_files_processor/processors/pdf_grobid.py", line 67, in process
    for it in r['authors']] if 'authors' in r else None
  File "/home/krnowak/src/invenio-files-processor/invenio_files_processor/processors/pdf_grobid.py", line 67, in <listcomp>
    for it in r['authors']] if 'authors' in r else None
IndexError: list index out of range
127.0.0.1 - - [09/Aug/2017 11:36:03] "POST /filesprocessor/pdf_grobid/95bb3c60-8727-4dde-8b2f-863a53d1414a HTTP/1.1" 500 -
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

Successfully merging a pull request may close this issue.

2 participants