Comments (3)
.. and the only way to silence it is to set it True like this: epub.read_epub(filename, {"ignore_ncx": True})
I think that the intention was to explicitly select whether you want it or not, and not use the default, which is False
.
But, as I said it forces you to select True
, otherwise you got a warning that looks really bad in a CLI.
This is because in the code, there is an
if not self.options.get('ignore_ncx'):
where it should be
if self.options.get('ignore_ncx') is None:
from ebooklib.
Huh. Thanks. This was pesky. Is this something that could be solved with a PR? At least to make the comment more clear in how to suppress the warning.
from ebooklib.
Huh. Thanks. This was pesky. Is this something that could be solved with a PR?
Yes, this is what the proposed change in the code does.
It's really a very simple change and that's why I just post it here instead of creating a PR.
epub.py
line 1393 change
if not self.options.get('ignore_ncx'):
to
if self.options.get('ignore_ncx') is None:
At least to make the comment more clear in how to suppress the warning.
You can't suppress the warning from your app in any other way.
Only by changing the original code.
from ebooklib.
Related Issues (20)
- How to get EPUB version number HOT 1
- Issue about section link in nav.xhtml
- Not able to update new chapters after reading the ebook HOT 1
- loop into epub file and make changes based on pattern .
- How to change the heading of nav page in created epub?
- Library fails to handle epub where some items in content.xml are missing HOT 1
- AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'? HOT 2
- Slashes in TOC file paths are converted to backslashes in EpubNav (on Windows) HOT 3
- Epub not showing up on kindle HOT 2
- Cant write epub HOT 1
- broken chapters in an ebook HOT 4
- Images not shown between pages HOT 5
- Get page as image HOT 3
- In some HTML elements, attribute names need to be case-sensitive to take effect, for example, the viewBox attribute within the <svg> element.
- Saving with `set_content` produces empty HTML HOT 1
- Is there any plan on typing supports?
- Can't change the metadata
- Non-image cover?
- Include a font file, or any arbitrary file? HOT 1
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 ebooklib.