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

file_name_to_id error #1

Open
fanchyna opened this issue May 17, 2016 · 0 comments
Open

file_name_to_id error #1

fanchyna opened this issue May 17, 2016 · 0 comments

Comments

@fanchyna
Copy link
Contributor

fanchyna commented May 17, 2016

In this case, I put a pdf file named WuJWEBSCI2012-crawling.pdf in the repository, and configures PDFMEF to load from the file system, I got the following error. It looks like that the current code expects file names constructed by numerical characters but this is not the case in general.

Traceback (most recent call last):
  File "main.py", line 140, in <module>
    ids = wrapper.get_document_ids()
  File "/home/jxw394/github/pdfmef/src/extractor/python_wrapper/wrappers.py", line 75, in get_document_ids
    ids.append(utils.file_name_to_id(docPath[docPath.rfind('/') + 1 : docPath.rfind('.pdf') + 4]))
  File "/home/jxw394/github/pdfmef/src/extractor/python_wrapper/utils.py", line 10, in file_name_to_id
    return int(ID)
ValueError: invalid literal for int() with base 10: 'WuJWEBSCI2012-crawling'
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