Comments (5)
Wow, thanks for detailed traceback and solution suggestion, mate... Will look into that.
I just realized it should've been explicit zlib.error exception to catch...
from epy.
Unzip -t :
testing: mimetype OK
testing: jacket.xhtml OK
testing: META-INF/container.xml OK
testing: OEBPS/9780062430052_toc.ncx OK
testing: OEBPS/9780062430052_content.opf OK
testing: OEBPS/images/cover.jpg OK
testing: OEBPS/images/auth.jpg OK
testing: OEBPS/images/copy.jpg OK
testing: OEBPS/images/copy1.jpg OK
testing: OEBPS/images/title.jpg OK
testing: OEBPS/images/heard.jpg OK
testing: OEBPS/imgbackad/imgbackad-1.jpg OK
testing: OEBPS/imgbackad/imgbackad-2.jpg OK
testing: OEBPS/styles/9780062430052_template.css OK
testing: OEBPS/text/titlepage.xhtml OK
testing: OEBPS/text/nav.xhtml OK
testing: OEBPS/text/About_the_Author.xhtml OK
testing: OEBPS/text/About_the_Publisher.xhtml OK
testing: OEBPS/text/9780062430052_Also_by.xhtml OK
testing: OEBPS/text/9780062430052_Credits.xhtml OK
...
jacket.xhtml does exist in the epub.
First file accessed was titlepage.xhtml. jacket.xhtml was 2nd.
I didn't look further if the file path "OEBPS/../jacket.xhtml" should have been resolved prior to this function.
Thanks for great app.
from epy.
Hey, there just fixed this with: 50dd4fa
Can you try upgrading epy (pip install --upgrade epy-reader
) and let me know if the issue still persists. Thanks.
from epy.
That works.
I think your leaving a bug by not putting an upper limit on max_tries to exit the while True
loop.
max_tries: Optional[int] = None # 1 if DEBUG else None
# use try-except block to catch
# zlib.error: Error -3 while decompressing data: invalid distance too far back
# seems like caused by multiprocessing
tries = 0
while True:
try:
content = self.file.open(content_path).read()
break
except zlib.error as e:
tries += 1
if max_tries is not None and tries >= max_tries:
raise e
That will loop indefinitely on any zip error.
The comment:
# use try-except block to catch
# zlib.error: Error -3 while decompressing data: invalid distance too far back
# seems like caused by multiprocessing
Suggests the loop is there as more than one attempt is needed for that error. But some upper limit would seem wise.
I've not seen that error, but I have seen zip files that have one member corrupted and that member is unreadable, while the rest are.
from epy.
Oh, that's indeed wise idea! Putting it in TODO, thanks!
from epy.
Related Issues (20)
- After blockquote an extra paragraph is indented HOT 6
- Feature requests HOT 1
- hii, formatting missalignment report HOT 2
- feature request: open [IMAGE] via double click with the mouse HOT 1
- How to use HOT 20
- ImportError: cannot import name 'unpackBook' from 'epy_extras' (unknown location) HOT 1
- Custom CSS?
- Empty search string causes AssertionError HOT 3
- How exactly is `TTSEngineArgs` defined?
- Allow more friendly text selection to clipboard
- Unable to open fb2.zip file. HOT 1
- How to go through search matches? HOT 3
- Mark Position / Jump To Position?
- [Feature request]View embed image
- [Asking] How to hide underline HOT 3
- [Feature Request] Importing book lists to epy history database HOT 3
- Strange crash in zipfile HOT 10
- AUR epy-git: pkgver() error HOT 11
- Image marker isn't visible on a page with multiple images HOT 5
- [Feature Request] Reset margins when window is fullscreened again
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epy.