Skip to content
EPUBCheck · Package document (OPF)

OPF-002

Updated:

EPUBCheck OPF-002 is a fatal error message: “The OPF file "…" was not found in the EPUB.” The package document named in META-INF/container.xml is not in the archive, so nothing else can be checked.

The official message

The OPF file "%1$s" was not found in the EPUB.

Default severity
Fatal error. EPUBCheck could not continue checking this part of the EPUB. The file is invalid.
EPUBCheck version
5.4.0

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

Typical causes

  • A full-path in container.xml that does not match the real path or case of the .opf file.
  • The .opf file was renamed or moved.

How to fix it

  • Make the rootfile full-path in container.xml match the package document's real path, including case.

Terms used here

Other OPF messages

  • OPF-001 There was an error when parsing the EPUB version: ….
  • 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-004a Invalid prefix declaration: found empty prefix.
  • OPF-004b Invalid prefix "…": must be a valid non-colonized name (aka "NCName").
  • OPF-004c Invalid prefix declaration: prefix "…" must be immediately followed by a colon character (":").

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

FAQ

What does EPUBCheck OPF-002 mean?

EPUBCheck OPF-002 is a fatal error message: “The OPF file "…" was not found in the EPUB.” The package document named in META-INF/container.xml is not in the archive, so nothing else can be checked.

Is OPF-002 an error?

OPF-002 is reported as fatal error by default. EPUBCheck could not continue checking this part of the EPUB. The file is invalid.