View Full Version : ePub files on upload to iTunes Connect

01-08-2011, 12:13 PM
Hope this is the right forum to post this to.

I have successfully created an epub file from InDesign CS5, have put it through Calibre, have made some fixes in the xhtml file to allow cross references to work, the file passes ePub Checker, and have successfully converted it to mobi for upload to Amazon (which has been successful as well). But when I upload it to iTunes Connect I'm getting error messages like this:

ERROR ITMS-9000: "Invalid URI in manifest OEBPS/1 part page.xhtml : Illegal character in path at index 7: OEBPS/1 part page.xhtml" at Book (MZItmspBookPackage)
ERROR ITMS-9000: "Invalid URI in manifest OEBPS/2 part page.xhtml : Illegal character in path at index 7: OEBPS/2 part page.xhtml" at Book (MZItmspBookPackage)
ERROR ITMS-9000: "Invalid URI in manifest OEBPS/3 part page.xhtml : Illegal character in path at index 7: OEBPS/3 part page.xhtml" at Book (MZItmspBookPackage)

Any suggestions on how I can fix this? I don't have a problem going into the particular xhtml file to fix it, I just need to know what to write.

01-08-2011, 12:30 PM
Moved to the ePub forum. You're more likely to get help here.

01-08-2011, 02:07 PM
It could be that iTunes Connect is having trouble with the spaces in the file names. If I count correctly, starting at 0, index 7 points to a space. You could try changing all those spaces to _ (everywhere), or only in this manifest, changing the spaces to %20. This is only a guess, as I avoid spaces in file names out of long habit.
You could also try validating with FlightCrew (part of Sigil), for better error messages.
Of course, it this is peculiar to Apple, FlightCrew won't complain.

01-08-2011, 09:19 PM
Thanks for this insight. I did look in some of the files and found this command:

<a id="anthor-94-anchor" class="calibre4"></a>

This command gave me problems once before and just getting rid of it fixed the problem. However it was in almost all my files. I don't know if Calibre generated this or where it came from.

This is another one of the errors from iTunes Connect:

ERROR ITMS-9000: "Invalid URI in manifest OEBPS/Addl FC page.xhtml : Illegal character in path at index 10: OEBPS/Addl FC page.xhtml" at Book (MZItmspBookPackage)

This is the file it is referring to:

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="">
<title>Addl FC page.xhtml</title>
<meta content="; charset=utf-8" http-equiv="Content-Type"/><link href="../stylesheet.css" type="text/css" rel="stylesheet"/><style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }</style></head>
<body class="calibre">
<div id="addl-fc-page" class="calibre1">
<div class="calibre1">
<img src="images/Addl%20forgotton%20classic_fmt.jpeg" alt="Addl forgotton classics.jpg" class="calibre2"/>

I just don't know enough of the language here to know what is invalid. But this same error is occurring in several other files and I would get rid of it if I knew what to look for.

Any help you could offer would be appreciated.

01-08-2011, 11:14 PM
I believe the problem is in your manifest file, not in the named files. Again this time, I note that there is a space at index 10 in the URI <OEBPS/Addl FC page.xhtml>. Note in the named xhtml file use of %20 in the file name: src="images/Addl%20forgotton%20classic_fmt.jpeg" - I beliee this is the correct form for an XHTML URI.

01-09-2011, 01:57 AM
Yes, pholy is correct. The foolproof solution is to change the actual filename to OEBPS/Addl_FC_page.xhtml and change the reference in the manifest to match. You'll need to do this with every filename that contains spaces.

In the future, I strongly recommend always using filenames that contain no spaces.

01-09-2011, 05:30 AM
Just to expand a little on what the previous posters have said:

Where these error messages refer to "manifest", they're referring to the manifest section of the .opf file which is contained in the EPUB file. The manifest section in the .opf file lists all of the files contained in the EPUB file, and as the previous posters have noted, it would appear that iTunes Connect has problems with file names that contain spaces.

You could unzip the EPUB file, change all of the file names to replace spaces with underscore characters, then use global "find and replace" on the XHTML, .opf and .ncx files to replace all references to these file names with the revised file names.

(When you then create the new zip/epub file with the revised files, make sure the "mimetype" file is the first file in the zip file, and that it is uncompressed and unencrypted.)

01-10-2011, 11:37 AM
Thank you all so much for this great information. I took all the spaces out of all the file names as suggested and reuploaded the file and IT WORKED!!! Such a simple fix once you understand what's going on.

Once again, thanks to all of you for helping me fix this!

01-10-2011, 01:07 PM
Glad to hear you got it sorted out successfully, larlarcook. You're welcome! :)