From fbba92281dca2f17e536b307107623e5051b9688 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 30 May 2019 22:41:17 -0400 Subject: [PATCH] py3: fix reading bytes and trying to write in text mode --- src/calibre/ebooks/lrf/meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/lrf/meta.py b/src/calibre/ebooks/lrf/meta.py index d9c69cbd01..9a78ea2e4a 100644 --- a/src/calibre/ebooks/lrf/meta.py +++ b/src/calibre/ebooks/lrf/meta.py @@ -716,7 +716,7 @@ def main(args=sys.argv): td = "None" if t and len(t) > 0: td = os.path.basename(args[1])+"_thumbnail."+lrf.thumbail_extension() - with open(td, "w") as f: + with open(td, "wb") as f: f.write(t) fields = LRFMetaFile.__dict__.items()