View Full Version : How do I fix an illegal character error ITMS-9000 with iBooks Producer?


Kratos
11-06-2012, 10:46 AM
Hi. I've created an epub using Indesign CS5.5. The epub validates correctly. I have tried uploading it to iBooks with iTunes producer. And I am receiving these error messages for each html page:

ERROR ITMS-9000: "Filename.epub: Invalid URL in Nav file My book 05 21st Oct 2012-1.html#toc_marker-1 : Illegal character in path at index 3: HTG_iPad_Mini_05_21st_Oct_2012-1.html#toc_marker-1" at Book (applepackagename)

Now I found a blog post on Pigs, Gourds & Wikis (http://www.pigsgourdsandwikis.com/2011/11/non-allowed-characters-in-filenames-in.html) which explains the error is because iBooks doesn't allow spaces in file names.

So I opened the toc.ncx file in Notepad +. I change all the file names, like the one listed above, so all the blank spaces I changed to underscores_ .
However when I tried to reupload the file I'm still getting errors. I thought I'd finished but I haven't. Please, any ideas how I can fix this?

Jim Lester
11-06-2012, 11:43 AM
Did you change the names of the actual files in your .zip/.epub as well, when you changed the references?

Kratos
11-06-2012, 12:03 PM
At first I didn't. But now I have changed the actual name of the html files and the references to them in the toc.ncx. Now I am getting an error with the epub validator

ERROR: E:\zzzzzzzz F23 use to edit\F28Hyphen.epub/OEBPS/toc.ncx(2753): 'OEBPS/My-book-05-21st-Oct-2012-457.html': referenced resource exists, but not declared in the OPF file

Now I've opened the OPF to take a look. Near the top of the doc I see a list of references that look like this:

<item id="My-book-05-21st-Oct-2012-381" href="My%20book%2005%2021st%20Oct%202012-381.html" media-type="application/xhtml+xml"/>


and further down loads of these
<itemref idref="My-book-05-21st-Oct-2012-334"/>

So it seems like the revised name is declared in the OPF but the validator is saying it isn't. So I don't know what it is I should be changing.

Kratos
11-06-2012, 01:47 PM
I have found a workaround to the ITMS-9000 problem with the help of deep searching with Ms Google. :)

I opened my epub in Sigil, I then saved it as a new epub. I unzipped the epub to have a look and it made some changes. In the ncx it replaced spaces in file names with %20. It also reordered the contents of the epub. So inside there is content.opf, toc.ncx, a text folder, images folder, and styles folder. Whilst Sigil arranges the content of the epub to a different way Im not complaining as I have uploaded it with iTunes Producer and haven't had any error messages from Apple yet. I hope this helps anybody else who this drives mental.

But if anybody does know how I could have fixed my epub without using Sigil then I'd be happy to know as I tried multiple combinations of using %20 and underscores/ hyphens in the ncx file and renaming the html files and editing the opf file references.

But am happy now.

JSWolf
11-19-2012, 07:21 PM
You want to make sure none of your filenames have spaces. They can cause untold problems.