From 20ac15a4a878623633870bfec483ab34514d22b4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Apr 2010 11:55:12 -0600 Subject: [PATCH] Conversion pipeline: Ignore links in the HTML that have quoted non-ASCII characters, since there is no way to decode them correctly. Fixes #5354 (Failure to download "El Pais" X3 weeks) --- src/calibre/ebooks/oeb/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 6c432fcb2f..fc0a832528 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -430,7 +430,10 @@ class DirContainer(object): return f.write(data) def exists(self, path): - path = os.path.join(self.rootdir, urlunquote(path)) + try: + path = os.path.join(self.rootdir, urlunquote(path)) + except ValueError: #Happens if path contains quoted special chars + return False return os.path.isfile(path) def namelist(self):