Skip to content

Commit

Permalink
Use image name in warning from xml_record
Browse files Browse the repository at this point in the history
  • Loading branch information
mittagessen committed May 12, 2024
1 parent fb773ea commit b594af3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kraken/lib/arrow_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b594af3

Please sign in to comment.