EPUBCheck RSC-007: referenced file not found
Updated:
EPUBCheck RSC-007 is an error message: “Referenced resource "…" could not be found in the EPUB.” A link or reference points to a file that is missing from the book. EPUBCheck reports the same text as RSC-007 (an error) and as RSC-007w (a warning, for references that do not break the publication's validity); the causes and the fix are the same.
The official message
Referenced resource "%1$s" could not be found in the EPUB.
- 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 misspelled path or wrong case (paths are case-sensitive).
- A file that was deleted or renamed, or a link left over from the source document, such as a converted PDF's internal link.
- RSC-007w: the same missing target in a reference EPUBCheck only warns about.
How to fix it
- Find the reference named in the message and compare its path with the files really in the archive.
- Correct the path, or add the missing file to the EPUB and the manifest.
- Remove the link if the target no longer exists, and validate again.
When it's not this
If the file exists but is not listed in the manifest, that is RSC-008, not RSC-007.
Also reported as
RSC-007w(warning): Referenced resource "%1$s" could not be found in the EPUB.
Terms used here
Other RSC messages
RSC-006Remote resource reference is not allowed in this context; resource "…" must be located in the EPUB container.RSC-006bResource "…" is located outside the EPUB Container; please check the resource is retrieved in scripted content.RSC-008Referenced resource "…" is not declared in the OPF manifest.RSC-005Error while parsing file: …RSC-009A non-SVG image resource should not be defined with a fragment identifier.RSC-004File "…" is encrypted, its content will not be checked.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.