Vinaya EPUB Errors - "Duplicate entry name: introduction.xhtml"

Ven. @Snowbird, I have received the following message from a monastic friend:

I have tried reading your latest Vinaya collection as an EPUB—downloading it from Sutta Central twice—but I’m afraid to report that it doesn’t work! I’ve tried both on my phone using the Episteme app (which gives the error: “Error: Duplicate entry name: EPUB/introduction.xhtml”) and on my Kobo e-reader; the latter failed previously but now at least displays the message: “Not authorized to open this book: This book is protected by Adobe Digital Rights Management (DRM).” Something seems to be wrong! Perhaps you could send me a working EPUB file? I could then add it to the Dhamma-Dana Archive on my website as well.

Any suggestions for what to do?

1 Like

There is indeed an error in the epub, although for me it does not prevent opening. When I open it in Sigil (an epub creator/editor app) I get the following warning which is consistent with your friend:

When I clear that error I get a second:

This should be fixed, even though it does not cause a fatal error on many apps. @HongDa ?

Regarding the DRM error, that’s completely strange. There is absolutely no DRM on these files. There is no question on that. I have no idea why or how they even could get that error.

My suggestion would be to run the epub through Calibre and convert from epub to epub. For me this fixes the duplicate file paths error and might fix the DRM error.

In any case, you might advise them that it is better to have their website link to SuttaCentral rather than hosting a version of the file that will sooner or later be out of date.

4 Likes

@Snowbird Got it, let me check it.

I recall not having made any changes to the EPUB format for a long time.

2 Likes

Yes, I suspect that with the duplicate file paths that the user is using a reader that is fairly unforgiving, that’s why it’s getting that error.

I’m inclined to think that the DRM thing is either user error or something else going on with the specific device. Unfortunately I don’t have a Kobo to try it on.

2 Likes

hmm, I’ll check the duplicate file path issue first.

2 Likes

I can also add that it opens in ReadEra on Android, but the links below does nothing when you tap it.

Also (possibly related to the error) in ReadEra, the Introduction does not appear in the book’s semantic table of contents:

And when I open with Calibre Reader on Windows, clicking on the semantic link to the introduction it takes me to the glossary:

There are tools to do a check on the integrity of epub files. It would be marvelous if those could be automatically used in your build script. Otherwise errors could go undetected for years.

4 Likes

It is likely caused by these newly added files; they use the same class name:

class=‘introduction’

I will double-check, and if that is indeed the issue, I will fix it.

4 Likes

Honestly, it’s a massive and very complicated ebook.

From a user perspective it might be better to have four books (Bhikkhu, Bhikkhuni, Khandhaka, Parivara).

5 Likes

hmm, The entire Vinaya Pitaka is indeed voluminous; it is certainly worth considering splitting it up for publication.

3 Likes

Theravāda-Collection-on-Monastic-Law-brahmali-2026-09-24.epub (2.2 MB)

Hi @Snowbird , I’ve tried fixing it and generated a new EPUB; please give it a try when you have a moment to see if there are any issues.

3 Likes

No errors in Sigil, and the Introduction item works now in Calibre Reader.

Bhante @Brahmali, could you ask your friend to try this new version?

4 Likes

My friend is happy! He was able to make it work. Thank you both for you support!

3 Likes

It’s really helpful if we could know what he did to make it work. Was just using the new file enough?

2 Likes

I am not sure how helpful it is, but this is what he told me:

It’s also great that you posted on the forum! It paid off, because the new version of the book I downloaded now works with my Kobo e-reader!

2 Likes

Very helpful! Means that the new version works and he didn’t have to do any reprocessing. Thanks!

5 Likes

For reference, HongDa added a number suffix to de-duplicate chapter names: feat: enhance chapter naming to prevent collisions in EPUB output · suttacentral/publications@9cfe856 · GitHub

3 Likes