Errors Compiling to Kindle (KF8/Mobi Ebook)

is
isagirl
Posts: 11
Joined: Thu Nov 23, 2017 2:22 am
Platform: Mac

Thu Jan 25, 2018 4:25 pm Post

Hello, LL:
I'm getting this error trying to compile to KF8/Mobi Ebook.

If I switch to "Kindle Mobi Ebook" only (i.e. no KF8) it compiles fine.

Details from kindlegen:


*************************************************************
Amazon kindlegen(MAC OSX) V2.9 build 1028-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title [redacted]
Info(prcgen):I1047: Added metadata dc:Creator [redacted]
Info(prcgen):I1002: Parsing files 0000049
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <p>
in file: /private/var/folders/0_/mkz7qhvx2wd2jvvz1r5yvw4r0000gn/T/EBOOK_TEMP/NotE/body.xhtml line: 0000013
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Info(prcgen):I1008: Resolving start reading location
Warning(prcgen):W30013: Invalid "nav" element in Navigation file. Please refer to Kindle Publishing Guidelines about usage of EPUB3 Navigation support. A "nav" element can have two child elements, an optional heading and a mandatory ol ordered list in file: /private/var/folders/0_/mkz7qhvx2wd2jvvz1r5yvw4r0000gn/T/EBOOK_TEMP/NotE/contents.xhtml line: 8
Error(prcgen):E24012: Epub Navigation file could not be built.
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(prcgen):I1038: MOBI file could not be generated because of errors!

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jan 25, 2018 5:54 pm Post

This is fixed for 3.0.2.

Thanks and all the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

is
isagirl
Posts: 11
Joined: Thu Nov 23, 2017 2:22 am
Platform: Mac

Fri Jan 26, 2018 6:42 pm Post

KB wrote:This is fixed for 3.0.2.

Thanks and all the best,
Keith


No, thank YOU. Scrivener has changed my writing life.

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Jan 29, 2018 1:23 pm Post

Thanks! That's very kind to say!
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ev
evitarubin
Posts: 6
Joined: Mon May 21, 2018 7:49 pm
Platform: Mac

Mon May 21, 2018 7:56 pm Post

Hi there,

I've got 3.0.2 installed and I'm getting pretty much the same error. I've used the "Copy Special to ToC" and that seems to be generating the problem - had no issues compiling prior to creating the ToC for kf8/mobi ebook.

Suggestions on how to get the ToC and a successful compile?

Code: Select all

Warning(prcgen):W30013: Invalid "nav" element in Navigation file. Please refer to Kindle Publishing Guidelines about usage of EPUB3 Navigation support. A "nav" element can have two child elements, an optional heading and a mandatory ol ordered list  in file: /private/var/folders/t1/88cppy092vx5x_00h7c508t80000gn/T/EBOOK_TEMP/2018-05-21-novel-template-MAGIN/contents.xhtml line: 8


Thank you!
Evita

UPDATE:
Tried the fix here:
http://literatureandlatte.com/forum/vie ... 93#p255893

No dice. still throwing the error.

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue May 22, 2018 11:44 am Post

Can you please attach a sample project showing the error by zipping up the project and using the "Attachments" tab beneath the reply text area?
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ev
evitarubin
Posts: 6
Joined: Mon May 21, 2018 7:49 pm
Platform: Mac

Wed May 23, 2018 2:28 am Post

Thank you for responding. I've uploaded a skeletal version of the file.

In the front matter section, there's a file called "contents" for the ToC. There's one link in it called "Translator's Note". If the link is there, I get the error below. If I delete the link, I can compile to kindle successfully.

I hope it's just a matter of having improperly configured settings and that you'll have an easy fix :) Theres a high learning curve, but I'm loving Scrivener. Thanks for your help.

Eva

When the Contents file has the internal link to Translator's Note, I get the error:
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Info(prcgen):I1008: Resolving start reading location
Warning(prcgen):W30013: Invalid "nav" element in Navigation file. Please refer to Kindle Publishing Guidelines about usage of EPUB3 Navigation support. A "nav" element can have two child elements, an optional heading and a mandatory ol ordered list in file: /private/var/folders/t1/88cppy092vx5x_00h7c508t80000gn/T/EBOOK_TEMP/2018-05-22-sample-cant-compile-kindle-kf8-MAGIN/contents.xhtml line: 8
Error(prcgen):E24012: Epub Navigation file could not be built.
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(prcgen):I1038: MOBI file could not be generated because of errors!
Last edited by evitarubin on Thu May 24, 2018 3:08 am, edited 1 time in total.

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Wed May 23, 2018 11:35 am Post

Thanks for the sample project. I'm afraid I cannot reproduce the error, though. I compiled your sample project and it threw no errors and opened in Kindle Previewer fine. I also tried compiling with the "Ebook" folder set as the front matter, but that worked fine, too, and opened in Kindle Previewer.

Is there anything else I need to do the error? Are you seeing the error in this skeletal version of the project yourself?

Thanks for the kind words!

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
AmberV
Posts: 21576
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed May 23, 2018 12:19 pm Post

I had no issues with the compilation of this project as well, with or without the front matter folder added in. The table of contents is generated properly.

To make sure we’re using the same rough setup: are you using Scrivener in a language other than English? That might impact the creation of some internal files.

What I would also suggest is going into the general options tab in compile overview and enabling the Save source files in a folder with exported Kindle file setting. Upon compilation you will get a folder that contains all of the internal files used to create the Mobi. Of most interest to us would be the text of the contents.xhtml file, in the root level of that folder.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

ev
evitarubin
Posts: 6
Joined: Mon May 21, 2018 7:49 pm
Platform: Mac

Thu May 24, 2018 3:07 am Post

Thank you AmberV and KB for taking the time to look...

Hanging my head in a little shame at present...a true PEBKAC (problem exists between keyboard and chair) moment.

After seeing that neither of you had any problems with the compilation, I figured it had to be one of my settings. Sure enough, I hadn't assigned a section type to the contents page. Once I assigned a "Table of Contents" section, voila. Like magic, it worked.

And now I have a beautiful book. I am so relieved and happy.

Thank you again for your help....hopefully someone else with this same error will see this thread and work it through a little more gracefully ;).

Cheers,
Eva

User avatar
AmberV
Posts: 21576
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Thu May 24, 2018 11:40 am Post

Glad to hear it was a simple fix! :)
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu May 24, 2018 12:21 pm Post

Glad you got it sorted! I'm still curious as to why I didn't see this error in the sample project, though - had the contents page in that got some of the text removed, perhaps? I suspect the error was caused because of Epub's very strict rules regarding tables of content, which are these:

- The content links must all be contained in a list.
- They must be surrounded by a <nav> block in the HTML.
- The <nav> block can only contain content links and (optionally) a styled heading at the top. Anything else must be contained outside of the <nav> block.

Scrivener does its best to apply all this to the content you provide it - for instance, it finds the first link and places the <nav> HTML block either just before it or just before a heading if there was one directly before the link. However, depending on the content of the ToC document, Scrivener may not always be able to do this accurately, which is what I'm guessing may have been the case here.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ev
evitarubin
Posts: 6
Joined: Mon May 21, 2018 7:49 pm
Platform: Mac

Fri May 25, 2018 3:25 pm Post

To be honest, I'm still confused as to why the error didn't show on your end. I still can't figure out exactly what I did that resolved it, either. I like to know what change I'm making that resolves an error so I know how to solve it the next time.

Right now, I've got all the ToC links showing and working great in the book, but in the Preview ToC, the introductory files (not front matter) before Part I aren't showing.

I did create a new section type called Introduction and Forward, so I'm guessing I may not have set something up that would have them be handled correctly for the Preview ToC.

Also, there are 3 Parts, only Part I and Part II show in the Preview ToC link list (on the left in Preview). I've looked and re-looked. The section types are the same in Part III and in Parts I and II. I can't see what's triggering the difference in the way Part III is being handled.

When I looked at the xhtml file, there are <p> tags surrounding the links that do not show in the Preview ToC (Part III and the introductory files before Part I ToC links) .

After reading your latest response, I'm guessing that has something do with why they're not showing - and is related to the structure. I am wading into figuring this out now...

Update: If I uncheck "Title" in the ToC Section Layout (in compile settings), then all files show up in the ToC in Preview (including ones I did not include in my manually created ToC file with "Copy documents as structured link list".

For some reason, I'm guessing that I'm missing the setting that allows Scrivener to see that Part III and the Introduction and Forward files are "titles"...

Update #2: I understand ToC much better now...but am still struggling. will post a new thread elsewhere since I already hijacked this one. Essentially, when you automatically generate the HTML ToC, any section will be added to the ToC, There's no way to create a page break between files. So I went back to trying to get a manual ToC to work, and am back to getting errors at compile. There may be a much better way to do achieve the outcome I'm looking for, but I haven't figured it out yet.

again, thank you :)
Eva

ev
evitarubin
Posts: 6
Joined: Mon May 21, 2018 7:49 pm
Platform: Mac

Sat May 26, 2018 6:18 pm Post

UPDATE: I realized this occurs if I nest files within folders. I moved front matter out of the front matter section and took them out of folders and this error resolved.

Am back...wondering again if you could you could point me in any directions?

I didn't realize that even if the kindle didn't compile that the source files would still be generated, so that's why I didn't post earlier.

Should each ToC link be prefaced with 1.?

If not, how do I fix?

I edit > copied special > structured list of links and pasted in the toc file. Here is the xhtml file for the toc:

Code: Select all

<!DOCTYPE html>
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
   <meta charset="utf-8"/>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Contents</title>
   <link type="text/css" rel="stylesheet" href="css/stylesheet.css"/>
</head>
<body>

<nav epub:type="toc" id="toc">
<p class="titled-section-page-padding"><br /></p>
<div class="titled-section">
 1. <span id="doc1">CONTENTS</span>
 1. <a href="body.xhtml">MAGIN: TIME To Tell This Story</a>
 1. <a href="body1.xhtml">Copyright</a>
 1. <a href="body2.xhtml">Credits</a>
 1. <a href="body3.xhtml">About The Editors</a>
</div>
</nav>

</body>
</html>

User avatar
KB
Site Admin
Posts: 19882
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue May 29, 2018 4:57 pm Post

Could you please attach (or send to mac.support AT literatureandlatte.com) the project exactly as it is with the problems, so that we can see the project in the state it is when you Compile and see these issues? Unfortunately, without seeing the project itself, it is difficult to know the cause, and we couldn't reproduce it with the version of the project you sent previously.

There are clear errors in the HTML you have attached, which are related to the way Scrivener generates the HTML, but I need to see the project to find the cause, as I cannot reproduce any problems in Scrivener 3.0.2.

Thanks and all the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."