From f6517cc81888fba2ddb668b6414cae177c25b77d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 14 Jul 2021 17:14:04 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/conversion/plugins/txt_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plugins/txt_input.py b/src/calibre/ebooks/conversion/plugins/txt_input.py index 82fae5d53e..682364d7c0 100644 --- a/src/calibre/ebooks/conversion/plugins/txt_input.py +++ b/src/calibre/ebooks/conversion/plugins/txt_input.py @@ -114,7 +114,7 @@ class TXTInput(InputFormatPlugin): for img in root.xpath('//img[@src]'): src = img.get('src') prefix = src.split(':', 1)[0].lower() - if prefix not in ('file', 'http', 'https', 'ftp') and not os.path.isabs(src): + if src and prefix not in ('file', 'http', 'https', 'ftp') and not os.path.isabs(src): src = os.path.join(base_dir, src) if os.path.isfile(src) and os.access(src, os.R_OK): with open(src, 'rb') as f: