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

pdf_path cannot be without a trailing slash #442

Closed
HiromuHota opened this issue Jun 12, 2020 · 0 comments · Fixed by #459
Closed

pdf_path cannot be without a trailing slash #442

HiromuHota opened this issue Jun 12, 2020 · 0 comments · Fixed by #459
Labels
bug Something isn't working

Comments

@HiromuHota
Copy link
Contributor

Describe the bug

docs_path and pdf_path are typically followed by a slash "/" like below:

docs_path = "tests/data/html/"
pdf_path = "tests/data/pdf/"

doc_preprocessor = HTMLDocPreprocessor(docs_path, max_docs=max_docs)

corpus_parser = Parser(
    session,
    parallelism=PARALLEL,
    structural=True,
    lingual=True,
    visual=True,
    pdf_path=pdf_path,
)

While docs_path can be without a trailing slash, pdf_path cannot.

To Reproduce
Steps to reproduce the behavior:

  1. Do not set a trailing slash like pdf_path = "tests/data/pdf"
  2. Parse

Expected behavior

pdf_path without a trailing slash works too.

Error Logs/Screenshots
If applicable, add error logs or screenshots to help explain your problem.

I/O Error: Couldn't open file 'tests/data/pdf112823.PDF': No such file or directory.

Environment (please complete the following information):

  • OS: macOS 10.15.4
  • PostgreSQL Version: N/A
  • Poppler Utils Version: N/A
  • Fonduer Version: 0.8.2
@lukehsiao lukehsiao added the bug Something isn't working label Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants