Skip to content

Commit d4b34d2

Browse files
committed
Handle change of non-existent file exception type in latest fsspec version.
1 parent 85afa8b commit d4b34d2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Fixed
2121
^^^^^
2222
- Failure to print help when ``object`` used as type hint.
2323
- Failure to parse init args when type hint is union of str and class.
24+
- Handle change of non-existent file exception type in latest fsspec version.
2425

2526

2627
v4.13.1 (2022-08-05)

jsonargparse/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def __init__(
410410
handle = fsspec.open(abs_path, fsspec_mode)
411411
handle.open()
412412
handle.close()
413-
except FileNotFoundError:
413+
except (FileNotFoundError, KeyError):
414414
raise TypeError('Path does not exist: '+abs_path)
415415
except PermissionError:
416416
raise TypeError('Path exists but no permission to access: '+abs_path)

0 commit comments

Comments
 (0)