File not closed
DuzaBF opened this issue · 1 comments
DuzaBF commented
Hi,
The function pdf2doi_singlefile
does not close the opened pdf file. The close file statement is not executed due to return statements on successful identifier finding.
Lines 161 to 165 in d8e7117
This causes the issue with pdf-rename
on Windows. The renaming attempt results in access error as file is opened by the script itself.
I'll make PR shortly to fix this.
MicheleCotrufo commented
I merged the contribution from DuzaBF, and made some additional changes to the code to make sure that a result
dictionary with the key 'identifier' is always returned. This should fix this bug.
Please download the version 1.3 of pdf2doi
:) I will also add the requirement in the requirements.txt of pdfrenamer