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: