Skip to content

Silence future warning #320

@uwardlaw

Description

@uwardlaw

When I execute book = epub.read_epub("valid.epub", {"ignore_ncx": True})

I get a future warning:

\Lib\site-packages\ebooklib\epub.py:1423: FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version.  If you rely on the current behaviour, change it to './/xmlns:rootfile[@media-type]'
  for root_file in tree.findall('//xmlns:rootfile[@media-type]', namespaces={'xmlns': NAMESPACES['CONTAINERNS']}):

Is there a way to silence this warning without altering the code, like with the ignore_ncx? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoNeeds more info from the reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions