Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2014, 08:37 AM   #1
Nautan
Junior Member
Nautan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2014
Device: epub3
Mimetype contains wrong type (application/epub+zip expected) error in epub3

Hi,
I have spent weeks trying to figure out this problem and am hoping you can help me! I am trying to zip my files in the creation of an epub3. I know that the mimetype.txt file must be submitted first (without compression) and then after the OEBPS and META-INF folders - but when I do so (via Winzip, 7zip - I have tried them all!) they all produce the mimetype error. I do not have any additional elements or spaces in the mimetype file - and I am wondering whether extra elements are being added to the mimetupe file in the process of zipping (like timestamp data for example). I have been teaching myself code but am still very much a newbie. If anyone can help me with this I will be SO grateful!!!
Thank you!
Nautan is offline   Reply With Quote
Old 06-22-2014, 09:11 AM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
You might find it easier to use the calibre editor and add files to it and the zipping up will be taken care of when you save it automatically.
mrmikel is offline   Reply With Quote
Advert
Old 06-22-2014, 09:20 AM   #3
Nautan
Junior Member
Nautan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2014
Device: epub3
Thanks mrmikel! I am familiar with Calibre and see how you add books, but am not sure how you add files? You mean adding mimetype.txt and the OEBPS folder and the META-INF folder, right? I tried dragging and dropping (as Calibre instructions directed) but this did not work.

Last edited by Nautan; 06-22-2014 at 09:40 AM.
Nautan is offline   Reply With Quote
Old 06-22-2014, 10:20 AM   #4
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Open only the calibre editor, or right click on the entry in your library to select edit. You can import just the files you want, use the table of contents editor to create a valid table of contents, etc.

In windows it is accessed by Program Files\calibre2\edit-book.exe.
mrmikel is offline   Reply With Quote
Old 06-22-2014, 12:13 PM   #5
Nautan
Junior Member
Nautan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2014
Device: epub3
Thanks mrmikel, the problem is that I used Calibre about a month ago to create my files and the resultant epub (even though it displayed perfectly in Calibre and in my kindle) still produced the mimetype error in the validation process. After this I went back to scratch, creating all the files and code myself - these files now work perfectly but the problem happens in the zipping process. I tried uploading my files to Calibre as you suggested, but in the process it mixed up all the html files - I corrected the order but still cannot seem to create an epub via Calibre that does not display the mimetype error. Any other ideas?? Thank you so much for your help with this, I am so desperate and just grateful for your time in trying to help me with it.
Nautan is offline   Reply With Quote
Advert
Old 06-22-2014, 12:34 PM   #6
Nautan
Junior Member
Nautan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2014
Device: epub3
Okay I tried it again - and despite my updates in the html code to reflect an epub3 format, and despite my inclusion of an epub nav file (toc.xhtml), the validation detects an epub2 version and generates additional errors
Nautan is offline   Reply With Quote
Old 06-22-2014, 05:36 PM   #7
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Don't try to validate with the tools in calibre. Use epubcheck or a check for whatever publisher you intend to use.

There is no publisher that uses full epub3.
mrmikel is offline   Reply With Quote
Old 06-23-2014, 02:36 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,044
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One thing you really need to do is make sure your ePub 3 works in ADE 2. If you try to sell a full blown ePub 3 eBook, you won't sell it as hardly anyone will be able to read it.
JSWolf is offline   Reply With Quote
Old 06-23-2014, 09:42 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
One thing you really need to do is make sure your ePub 3 works in ADE 2. If you try to sell a full blown ePub 3 eBook, you won't sell it as hardly anyone will be able to read it.
Not at all relevant to the OP's request for help creating a version 3 ePub that validates.

Quote:
Originally Posted by Nautan View Post
Hi,
I have spent weeks trying to figure out this problem and am hoping you can help me! I am trying to zip my files in the creation of an epub3. I know that the mimetype.txt file must be submitted first (without compression) and then after the OEBPS and META-INF folders - but when I do so (via Winzip, 7zip - I have tried them all!) they all produce the mimetype error. I do not have any additional elements or spaces in the mimetype file - and I am wondering whether extra elements are being added to the mimetupe file in the process of zipping (like timestamp data for example). I have been teaching myself code but am still very much a newbie. If anyone can help me with this I will be SO grateful!!!
Thank you!
What I've bolded could have been a typo, but please make sure you didn't actually name the mimetype file "mimetype.txt". It should just be " mimetype" with no file extension whatsoever.

I'm not certain Winzip will even allow you to create a proper epub archive. Not without using terminal commands and/or flags anyway. There's a windows program floating around the epub forum here somewhere called ePubPack that claims to be able to create a proper archive from source files. I've not used it however.

As far as calibre goes, I'm not certain if you can edit/save manually created epub3s without compromising/changing the ePub3 OPF file. Never tried it.

Last edited by DiapDealer; 06-23-2014 at 01:10 PM.
DiapDealer is offline   Reply With Quote
Old 06-23-2014, 01:04 PM   #10
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
Quote:
Originally Posted by DiapDealer View Post
Not at all relevant to the OP's request for help creating a version 3 ePub that validates.


What I've bolded, could have been a typo, but please make sure you didn't actually name the mimetype file "mimetype.txt". It should just be " mimetype" with no file extension whatsoever.
It should be named mimetype, with no extension and contain the text

Quote:
application/epub+zip
DomesticExtremis is offline   Reply With Quote
Old 06-23-2014, 01:09 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DomesticExtremis View Post
It should be named mimetype, with no extension and contain the text
Well, yes... though I thought I'd covered fairly clearly what the file name should be, you're absolutely correct about the contents of said file.

Did some testing with calibre's editor by the way:

I was able to open a valid epub3 in calibre's editor; make a few changes to the XHTML; save it; and still end up with an epub3 that passes validation. I'm guessing you won't be able to use any of the automated "fix" or "beautify files" features and maintain its validity as an epub3, but it doesn't seem to break anything when making basic edits. It even seemed to automatically "fix" an epub3 that had a mimetype file that wasn't the first file in the archive without breaking anything else.

Last edited by DiapDealer; 06-23-2014 at 01:36 PM.
DiapDealer is offline   Reply With Quote
Old 06-23-2014, 01:35 PM   #12
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
Quote:
Originally Posted by DiapDealer View Post
Well, yes... though I thought I'd covered fairly clearly what the file name should be, you're absolutely correct about the contents of said file.
Sorry, one of my eyes was readin gthe Op and the other yours.
They got merged in my brain - pilot error.
DomesticExtremis is offline   Reply With Quote
Old 06-23-2014, 01:39 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DomesticExtremis View Post
Sorry, one of my eyes was readin gthe Op and the other yours.
They got merged in my brain - pilot error.
No worries. I kind of figured something like that happened.
DiapDealer is offline   Reply With Quote
Old 06-29-2014, 04:55 AM   #14
skreutzer
Software Developer
skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.
 
skreutzer's Avatar
 
Posts: 189
Karma: 89000
Join Date: Jan 2014
Location: Germany
Device: PocketBook Touch Lux 3
Besides the .txt extension issue (Microsoft Windows may hide extensions of known file types), you want to make sure that the text editor doesn't add a UTF-8 BOM (Byte Order Mark) or a line break at the end of the file (either explicit or implicit, the latter on Unix-like operating systems). The mimetype file has to have the size of exactly 20 bytes.

Calibre doesn't create EPUB3s, it might be usable to edit EPUB3 and keep the result valid, if some buttons aren't pushed.
skreutzer is offline   Reply With Quote
Old 06-29-2014, 05:20 AM   #15
skreutzer
Software Developer
skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.skreutzer considers 'yay' to be a thoroughly cromulent word.
 
skreutzer's Avatar
 
Posts: 189
Karma: 89000
Join Date: Jan 2014
Location: Germany
Device: PocketBook Touch Lux 3
I just found this: http://idpf.org/forum/topic-1694
skreutzer is offline   Reply With Quote
Reply

Tags
epub3, mimetype, validation error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub Zip/Unzip AppleScript application for Mac OS X pdurrant ePub 145 03-08-2023 04:47 AM
New Errors Converting epub3 -> zip -> epub3 Lola25 ePub 2 11-12-2013 09:37 PM
Help with Apple error - ERROR ITMS-9000: ".epub: wrong namespace in filename.epub fil muzammil ePub 1 11-30-2012 05:25 AM
"Error importing EPUB. EOCD not found. Not a ZIP archive? (Error Code 1068)" oren Android Devices 1 02-20-2012 04:10 AM


All times are GMT -4. The time now is 08:20 AM.


MobileRead.com is a privately owned, operated and funded community.