Skip to content

Commit

Permalink
fix: ParsrConverter fails on pages without text (#3605)
Browse files Browse the repository at this point in the history
* try to fix bug

* remove print

* leftover
  • Loading branch information
anakin87 authored Nov 21, 2022
1 parent 7e0aa82 commit 5f62494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/nodes/file_converter/parsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def convert(
id_hash_keys,
)
tables.append(table)
if text[-1] != "\f":
if len(text) == 0 or text[-1] != "\f":
text += "\f"

if valid_languages:
Expand Down

0 comments on commit 5f62494

Please sign in to comment.