View Full Version : attribute "scheme" from namespace error in epubcheck 1.0.5


thunderune
07-15-2010, 06:02 AM
I am unsure of how to deal with this one, nor am I sure of how to search it.

ERROR: /Users/thunderrune/Desktop/E.S. Wynn - Pink Carbide.epub/OPS/fb.opf(24): attribute "scheme" from namespace "http://www.idpf.org/2007/opf" not allowed at this point; ignored


-Thanks

Jellby
07-15-2010, 06:29 AM
You may have some unclosed tag or some compulsory data missing. Can we see the fb.opf file (or the whole .epub)?

thunderune
07-15-2010, 02:53 PM
You may have some unclosed tag or some compulsory data missing. Can we see the fb.opf file (or the whole .epub)?

It is a whole ePub file, no additional files.

thunderune
07-15-2010, 02:59 PM
oh yeah, additional information, I made it off of feedbooks.com

Jellby
07-16-2010, 03:34 AM
OK, post it here then.

You know, you go to the advanced posting interface (click on "Go Advanced"), and then click on the "Manage Attachments" button below the text edit box.

thunderune
07-18-2010, 03:42 AM
Here it is, if you can fix it or tell me how to fix it that would be great.

To others reading this thread: this attachment is for diagnostic purposes only please do not download unless you intend on helping me fix it, thanks

thunderune
07-18-2010, 03:43 AM
I downloaded it once to see what it did, i am not used to this site

Jellby
07-18-2010, 04:22 AM
This is the culprit:

<dc:rights opf:scheme="URI">http://creativecommons.org/licenses/by/3.0/</dc:rights>

The OPF specification allows "scheme" to be used only in the <identifier> element, not anywhere else. If Feedbooks is including it in <rights>, it's doing wrong, and it's a bug.

thunderune
07-19-2010, 08:36 PM
Okay, how do you fix this bug? if fixing is not an option, do you recommend a Ebook program i can use?

Jellby
07-20-2010, 04:19 AM
Well, first you should write to FeedBooks support: support@feedbooks.com pointing to this thread. I'm sure they'll like to fix it.

In the meantime, fixing the ePUB is easy:

1. Unzip the .epub file, just as if it were a .zip file. If needed, rename the file to .zip first.
2. Open the OPS/fb.opf file with a text editor (not Word, but something like Notepad), and delete the offending opf:scheme="URI"
3. Add the modified file to the original .epub/.zip (or a backup). With WinZip/WinRar it's probably as simple as drag&drop.
4. Rename the .zip back to .epub if you had renamed it first.
5. Check it in the online validator: http://www.threepress.org/tools/

With something like WinZip/WinRar it could be even simpler, they might let you edit the files that are inside the .epub without having to actually unzip it.

thunderune
07-21-2010, 04:03 AM
Here it is, if you can fix it or tell me how to fix it that would be great.

To others reading this thread: this attachment is for diagnostic purposes only please do not download unless you intend on helping me fix it, thanks

Well, first you should write to FeedBooks support: support@feedbooks.com pointing to this thread. I'm sure they'll like to fix it.

In the meantime, fixing the ePUB is easy:

1. Unzip the .epub file, just as if it were a .zip file. If needed, rename the file to .zip first.
2. Open the OPS/fb.opf file with a text editor (not Word, but something like Notepad), and delete the offending opf:scheme="URI"
3. Add the modified file to the original .epub/.zip (or a backup). With WinZip/WinRar it's probably as simple as drag&drop.
4. Rename the .zip back to .epub if you had renamed it first.
5. Check it in the online validator: http://www.threepress.org/tools/

With something like WinZip/WinRar it could be even simpler, they might let you edit the files that are inside the .epub without having to actually unzip it.

thanks, but I did exactly as stated and now it is having a filename error stating that

"ERROR: /Users/thunderrune/Desktop/E.S. Wynn-Pink Carbide.epub: length of first filename in archive must be 8, but was 9"

any Ideas i would appriciate it

thanks,

Randy

charleski
07-21-2010, 05:31 AM
thanks, but I did exactly as stated and now it is having a filename error stating that

"ERROR: /Users/thunderrune/Desktop/E.S. Wynn-Pink Carbide.epub: length of first filename in archive must be 8, but was 9"

any Ideas i would appriciate it

thanks,

Randy

This is the error you get when the mimetype isn't treated properly. Use epubtweak (http://atlantiswordprocessor.blogspot.com/2009/11/tweaking-epubs-its-just-zip-file.html) to extract the opf file for editing and it'll avoid this.

Jellby
07-21-2010, 06:10 AM
"ERROR: /Users/thunderrune/Desktop/E.S. Wynn-Pink Carbide.epub: length of first filename in archive must be 8, but was 9"

Does that happen when you zip only the modified file into the original ePUB? Valid ePUB files are required to have the "mimetype" file zipped first and uncompressed. If you update only the modified files, the "mimetype" should remain unchanged and therefore the ePUB should remain valid. If the zip program does not behave in this way, it's probably not a bug, but it's weird. If, on the other hand, you are zipping again the whole contents of the original ePUB, don't do that, and update only the modified *.opf file instead.

thunderune
07-22-2010, 01:51 AM
Does that happen when you zip only the modified file into the original ePUB? Valid ePUB files are required to have the "mimetype" file zipped first and uncompressed. If you update only the modified files, the "mimetype" should remain unchanged and therefore the ePUB should remain valid. If the zip program does not behave in this way, it's probably not a bug, but it's weird. If, on the other hand, you are zipping again the whole contents of the original ePUB, don't do that, and update only the modified *.opf file instead.

Yeah I used stuffit archive manager to do this. I actually tried to create an archive from an unzipped folder but it didn't work. Ill try to use the aforementioned program an ill see how it works.

thunderune
07-23-2010, 04:53 AM
Well, first you should write to FeedBooks support: support@feedbooks.com pointing to this thread. I'm sure they'll like to fix it.

In the meantime, fixing the ePUB is easy:

1. Unzip the .epub file, just as if it were a .zip file. If needed, rename the file to .zip first.
2. Open the OPS/fb.opf file with a text editor (not Word, but something like Notepad), and delete the offending opf:scheme="URI"
3. Add the modified file to the original .epub/.zip (or a backup). With WinZip/WinRar it's probably as simple as drag&drop.
4. Rename the .zip back to .epub if you had renamed it first.
5. Check it in the online validator: http://www.threepress.org/tools/

With something like WinZip/WinRar it could be even simpler, they might let you edit the files that are inside the .epub without having to actually unzip it.


SUCCESS!! Thanks for the help guys! I will now report it to feedbooks.

dm1839
06-30-2011, 10:57 AM
I know this is an old thread, but for anyone looking at it, when the file was zipped back up, it compressed the mimetype file, which will cause an error. This is a Mac issue (if you use winzip on a PC, you'll be fine). If you want to re-zip the file on a Mac, you can use a program called Springy to only edit/re-zip the files within the ePub you're working on.