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

"Document "{document.name}" not added to database, because of parse error" but being added #489

Closed
HiromuHota opened this issue Jul 29, 2020 · 0 comments · Fixed by #490
Closed

Comments

@HiromuHota
Copy link
Contributor

Description of the bug

When an error happens during parsing, an error message: "Document "{document.name}" not added to database, because of parse error" appears, but the Document object itself is added to database before the parser error happens.

To Reproduce

Steps to reproduce the behavior:

  1. Use the latest commit (1d6771b)
  2. Let a parser fail
  3. Execute session.query(Document).count() to see how many Documents are added to the database.

Expected behavior

Either one of these behaviors

  1. The Document is not added.
  2. The error message gets corrected like "Document is added but not parsed".

Error Logs/Screenshots

"Document "{document.name}" not added to database, because of parse error"

Environment (please complete the following information)

  • Fonduer Version: 0.8.3-dev (1d6771b)

Additional context

Add any other context about the problem here.

I think this is a regression caused by b1b8d24, where doc: Document is saved to the database by session.merge(doc, load=True), so this could happen on v0.8.0, v0.8.1, v0.8.2 too.

HiromuHota pushed a commit to HiromuHota/fonduer that referenced this issue Jul 30, 2020
HiromuHota pushed a commit to HiromuHota/fonduer that referenced this issue Jul 30, 2020
HiromuHota pushed a commit to HiromuHota/fonduer that referenced this issue Jul 30, 2020
HiromuHota pushed a commit to HiromuHota/fonduer that referenced this issue Jul 30, 2020
senwu pushed a commit that referenced this issue Jul 31, 2020
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.

1 participant