Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-001: unreadable EPUB version

Updated:

EPUBCheck OPF-001 is an error message: “There was an error when parsing the EPUB version: ….” EPUBCheck could not read the EPUB version from the package document. The version attribute on the package element tells validators and reading apps which set of rules the book follows, so without a readable value the rest of the check is unreliable.

The official message

There was an error when parsing the EPUB version: %1$s.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • A missing or empty version attribute on the package element.
  • A malformed value, such as version="3" or version="EPUB 3", instead of a number like 3.0.
  • A package element written by hand or by a script that left the attribute out.

How to fix it

  1. Open the package document (the .opf file) and find the package element at the top.
  2. Set version="3.0" for EPUB 3 (EPUB 3.3 books still declare 3.0) or version="2.0" for EPUB 2.
  3. Run EPUBCheck again: errors that depended on the version should now be reported correctly.

When it's not this

If EPUBCheck reads the version but you asked for a different one with -v, that is PKG-001, not OPF-001.

Terms used here

Other OPF messages

  • OPF-002 The OPF file "…" was not found in the EPUB.
  • OPF-003 Item "…" exists in the EPUB, but is not declared in the OPF manifest.
  • OPF-004 Invalid prefix declaration: leading or trailing whitespace is not allowed.
  • OPF-005 Invalid prefix declaration: URI for prefix "…" doesn’t exist.
  • OPF-006 Invalid prefix declaration: URI "…" is not a valid URI.
  • OPF-007 Re-declaration of reserved prefix "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck OPF-001 mean?

EPUBCheck OPF-001 is an error message: “There was an error when parsing the EPUB version: ….” EPUBCheck could not read the EPUB version from the package document. The version attribute on the package element tells validators and reading apps which set of rules the book follows, so without a readable value the rest of the check is unreliable.

Is OPF-001 an error?

OPF-001 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.