diff options
author | wustho <benawiadha@gmail.com> | 2020-04-22 22:33:22 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-04-22 22:33:22 +0700 |
commit | 60e95ffce698b9a12bf86341d813aefe1a6c9651 (patch) | |
tree | eb00e30e46967dd72aec84e052e3ebe022c83e6e /epy.py | |
parent | dd29d8ee286929ee588f6d224b554b3f793aaaa3 (diff) | |
download | epy-60e95ffce698b9a12bf86341d813aefe1a6c9651.tar.gz |
Fixed: zlib.error: Error -3 while decompressing data:
invalid distance too far back.
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -211,7 +211,12 @@ class Epub: self.toc_entries[2].append("") def get_raw_text(self, chpath): - content = self.file.open(chpath).read() + while True: + try: + content = self.file.open(chpath).read() + break + except: + continue return content.decode("utf-8") def get_img_bytestr(self, impath): |