Skip to content

Commit

Permalink
Handle PDF with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Sep 5, 2024
1 parent 2f3e3cb commit a1d5021
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/extract_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ def extract_segments(task: Task, xml_file_name: str = "") -> ExtractionData:
if results and results.status_code == 200:
break

if not results:
raise SystemError(f"The PDF document layout analysis container did not respond with \n {task}")

if results.status_code != 200:
raise RuntimeError(f"Error processing PDF document: {results.status_code} - {results.text}")

Expand Down

0 comments on commit a1d5021

Please sign in to comment.