ePub Upload Error on Google Play Books

Last Updated on May 8, 2023 by Ava

I formatted an eBook for a client, which included conversion to ePub and mobi. When the client attempted to upload the ePub file to Google Play Books, the following error occurred:

Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “lang”, “style”, “title” or “xml:lang”

If you’re having a similar ePub upload error on Google Play Books, I’m going to show you how to fix the problem.

What You Need

  • A messed up ePub file – You’ll only know it’s messed up when you try to upload it.
  • Calibre – This free software is a must-have for self-publishers. It does a lot of things, but in this application, we will use it to edit the messed up ePub file.
  • A Google Play Books Partner Center account

What the Error Looks Like

The error occurs when you attempt to upload your ePub book file to Google Play Books. The platform used to accept a variety of file formats, but now you can only upload an ePub or PDF.

In this case, we’re working with an eBook file and we want the text to be reflowable so readers on all kinds of devices can view the content comfortably. So, we want to upload an ePub, but it’s giving us an error.

epub upload error

Fortunately, Google Play Books will provide you with the exact error, and where to find it in your ePub file so weepub upload error on google play can fix it!

Click the red text to open the error report.

The help information provided by Google Play Books here is not very helpful. They recommend an ePub file validator tool that requires Java to run. This is something most modern computers no longer have installed by default. If you go through all the trouble to get Java running on your machine, then you better know how to read the command line because that’s how the program delivers information.

This is not ideal.

Our error report looks like this:

index_split_005.html:10, 2667: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_005.html:10, 2782: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_005.html:10, 3008: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_008.html:10, 612: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_008.html:10, 1641: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_009.html:10, 1757: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_009.html:10, 2822: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_010.html:10, 252: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”
index_split_010.html:10, 625: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”

It’s a bit longer than this, but you get the idea. This looks like gobbledy gook, right? When my client first sent me the screenshot, I was like, “I have no idea what any of that means!”

I Googled “epub upload error on google play”, then I copied and pasted the error string directly and figured out my solution.

Let’s dissect this.

index_split_005.html:10,

This portion tells you where the error occurs in your ePub file. I’m sure you have no idea where this is. Don’t worry, Calibre will tell you. The rest tells you what you need to fix.

2667: Error while parsing file: attribute “value” not allowed here; expected attribute “class”, “dir”, “id”, “lang”, “style”, “title” or “xml:lang”

We don’t really care about any of it of this except for this:

attribute “value” not allowed here;

This is telling you what you have to remove from each location. The ePub file is using a value attribute in its XML coding that is not allowed. We just need to remove it with a simple Ctrl+F to find it and then delete it.

You’ll need to do this for each error in the report, save, and re-upload the ePub.

How To Fix an ePub Upload Error on Google Play Books with Calibre

Open Calibre.

Add your ePub file by clicking the green Add books button.

calibre add books

Click your book to highlight it (it’s highlighted by default after you upload it) and then click the purple Edit book button.calibre edit book

The Calibre Editor will open in a new window.

calibre editor

In the left File browser panel, you can see a portion of the error string you should recognize. This is how you find the location of the error you want to remove. Let’s refer back to our code:

index_split_005.html:10

Double-click the corresponding file in the File browser.

calibre editor file browser

We now have this very intimidating screen:

calibre editor

Don’t worry, we don’t have to know what this means.

Press Ctrl + F to pull up the Find Replace box. Type value in the Find box. Click Find.

calibre find replace

The Editor will find the text in the code and highlight it:

highlighted code

Highlight the entire attribute and press Delete.

highlight attribute

You can see in your error report how many instances there are for this file. In this case, we know we have 3 to fix:

epub upload error report

Click Find again to move on to the next one. Highlight and delete it in the same manner. Repeat this until you’re finished with all the errors in this file. Press Ctrl + S to Save.

Click the red X to close the file.

calibre close file

Double-click the next file in the error report and repeat the steps to Find, Replace, and delete the value errors.

next error

Repeat the steps:

  1. Press Ctrl + F to open Find/Replace.
  2. Type value in the Find box and click the Find button.
  3. Highlight the attribute and delte it.
  4. Repeat as many times as needed for the current file as indicated by the error report.
  5. Press Ctrl + S to Save.
  6. Click the red X to close the file.

When you’re done, don’t forget to save the file. Once you’ve saved the file, it’s okay to close the Editor window. Navigate to your newly repaired file by clicking the Book files link. The folder will open.

Book file location

This ePub is now ready to upload to Google Play.

You may need to repeat this process if you missed something. Google Play also timed out on me a couple of times, so if you have upload issues, try again later.

When I recreated my errors for this post, I had some new ones pop up that looked like this:

index_split_002.html:10, 474: Error while parsing file: element “a” not allowed here; expected element “address”, “blockquote”, “del”, “div”, “dl”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “hr”, “ins”, “noscript”, “ns:svg”, “ol”, “p”, “pre”, “script”, “table” or “ul” (with xmlns:ns=”http://www.w3.org/2000/svg”)
index_split_002.html:10, 559: Error while parsing file: element “blockquote” incomplete; expected element “address”, “blockquote”, “del”, “div”, “dl”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “hr”, “ins”, “noscript”, “ns:svg”, “ol”, “p”, “pre”, “script”, “table” or “ul” (with xmlns:ns=”http://www.w3.org/2000/svg”)

In this case, I would Find, Replace, and delete a and blockquote from the XML code using the Calibre Editor in exactly the same way we did the value attribute.

I Hope This Helps!

I hope this helps you with your ePub upload error on Google Play. I’m sure you’re excited to get your book available on all platforms, so one less hurdle is sure welcome!

Are you seeing a different problem with your ePub file? Let me know in the comments below, and I’ll try to help you out!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top