diff --git a/src/PIL/ImageFont.py b/src/PIL/ImageFont.py index 0fccee32f..89efe5bd8 100644 --- a/src/PIL/ImageFont.py +++ b/src/PIL/ImageFont.py @@ -932,7 +932,7 @@ def load_path(filename: str | bytes) -> ImageFont: return load(os.path.join(directory, filename)) except OSError: pass - msg = f"cannot find font file '{filename}' in sys.path" + msg = f'cannot find font file "{filename}" in sys.path' if os.path.exists(filename): msg += f', did you mean ImageFont.load("{filename}") instead?'