From e4399f3d9fe0c200c9881df9b7ef44477a6662a7 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy <1813121+kdheepak@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:28:22 -0500 Subject: [PATCH 1/2] fix: Use f-string to show filename in error message correctly --- panel/command/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/command/convert.py b/panel/command/convert.py index affc02a384..04e1a03443 100644 --- a/panel/command/convert.py +++ b/panel/command/convert.py @@ -114,7 +114,7 @@ def invoke(self, args: argparse.Namespace) -> None: for f in args.files: p = pathlib.Path(f).absolute() if not p.is_file(): - raise ValueError('File {f!r} not found.') + raise ValueError(f'File {f!r} not found.') elif p not in excluded: included.append(p) From 025b993c3351d50cf73ab3cfd6fbd1acccc5d8d5 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Mon, 6 Jan 2025 06:30:24 -0500 Subject: [PATCH 2/2] fix: Change ValueError to FileNotFoundError --- panel/command/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/command/convert.py b/panel/command/convert.py index 04e1a03443..d1193ce5ee 100644 --- a/panel/command/convert.py +++ b/panel/command/convert.py @@ -114,7 +114,7 @@ def invoke(self, args: argparse.Namespace) -> None: for f in args.files: p = pathlib.Path(f).absolute() if not p.is_file(): - raise ValueError(f'File {f!r} not found.') + raise FileNotFoundError(f'File {f!r} not found.') elif p not in excluded: included.append(p)