From 390e47bb4d4f51f44eb62f80982b75061d7f6ac5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Jul 2022 21:47:14 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/html/input.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index 7b2a78a7f6..f25ab230c6 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -15,7 +15,7 @@ import os, re, sys, errno as gerrno from calibre.ebooks.oeb.base import urlunquote from calibre.ebooks.chardet import detect_xml_encoding from calibre.constants import iswindows -from calibre import unicode_path, as_unicode, replace_entities +from calibre import unicode_path, replace_entities from polyglot.urllib import urlparse, urlunparse @@ -121,7 +121,7 @@ class HTMLFile: if not self.is_binary: src += f.read() except OSError as err: - msg = 'Could not read from file: %s with error: %s'%(self.path, as_unicode(err)) + msg = f'Could not read from file: {self.path} with error: {err}' if level == 0: raise OSError(msg) raise IgnoreFile(msg, err.errno)