Embed Metadata plugin tool creating errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I recently started to use the 'Embed Metadata' plugin tool. It's not something I've felt any great need for in the past but my experiments with EPUB2 to EPUB3 format-shifting made me realise that it's much easier to do if calibre has made the first pass at sanitising the original OPF file.
However, I discovered that a small number of my EPUB2s had zero Check Book errors before Embed Metadata but a level 3 error immediately afterwards, 'The OPF has no unique identifier'
I tracked down the problem to a combination of 2 things:
1. The original content of the OPF main <dc:identifier>, i.e. the one whose 'id' attrib matches the <package> 'unique-identifier' attrib.
2. My calibre library's 'identifiers' field was empty. This field is not one I've previously paid much attention to.
Both conditions had to be met to trigger the error. For the problematic books, if I added an ISBN value to the library before running Embed Metadata, then no new errors were created.
I've sorted out my own library but I've attached a couple of problem EPUBs (scrambled) in case you want to investigate further.
Those books are invalid, the <dcLidentifier> element has no text. In
other words the actual value of the identifier is missing. As such
calibre is perfectly within its rights to delete the element.
I should probably make Check Book check for not only the existence of
the identifier element, but also whether it is empty or not.
status invalid