We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 89a615e + cf0b371 commit 323c9eaCopy full SHA for 323c9ea
1 file changed
labelme/app.py
@@ -2562,4 +2562,11 @@ def _scan_image_files(root_dir: str) -> list[str]:
2562
images.append(relativePath)
2563
2564
logger.debug("found {:d} images in {!r}", len(images), root_dir)
2565
- return natsort.os_sorted(images)
+ try:
2566
+ return natsort.os_sorted(images)
2567
+ except OSError:
2568
+ logger.warning(
2569
+ "natsort.os_sorted failed (known macOS strxfrm bug), "
2570
+ "falling back to locale-unaware natural sort"
2571
+ )
2572
+ return natsort.natsorted(images)
0 commit comments