From b594af3553614b42a5ea44e6b167cde356ec3aa6 Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Mon, 13 May 2024 01:02:02 +0200 Subject: [PATCH] Use image name in warning from xml_record --- kraken/lib/arrow_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kraken/lib/arrow_dataset.py b/kraken/lib/arrow_dataset.py index bf3423266..310cd0fe0 100755 --- a/kraken/lib/arrow_dataset.py +++ b/kraken/lib/arrow_dataset.py @@ -63,10 +63,10 @@ def _extract_line(xml_record, skip_empty_lines: bool = True, legacy_polygons: bo try: line_im, line = next(extract_polygons(im, seg, legacy=legacy_polygons)) except KrakenInputException: - logger.warning(f'Invalid line {idx} in {im.filename}') + logger.warning(f'Invalid line {idx} in {xml_record.imagename}') continue except Exception as e: - logger.warning(f'Unexpected exception {e} from line {idx} in {im.filename}') + logger.warning(f'Unexpected exception {e} from line {idx} in {xml_record.imagename}') continue if not line.text and skip_empty_lines: continue