Skip to content

Commit

Permalink
Open XML files as binary to avoid encoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Mar 12, 2024
1 parent 2f76666 commit 7a38144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readux_ingest_ecds/services/ocr_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def fetch_positional_ocr(canvas):
return canvas.image_server.bucket.Object(canvas.ocr_file_path).get()['Body'].read()

if canvas.image_server.storage_service == 'local':
with open(canvas.ocr_file_path, 'r') as ocr:
with open(canvas.ocr_file_path, 'rb') as ocr:
return ocr.read()

def parse_alto_ocr(result):
Expand Down

0 comments on commit 7a38144

Please sign in to comment.