Invalid KindleGen file?


I’ve read through the tutorial, searched the User’s Guide, watched video instruction, and haven’t found anything explaining why the following might be happening:

Essentially, when I go to compile a Kindle eBook, Scrivener gives me an “Invalid KindleGen file” message: “The file at /users/me/desktop/ does not seem to be a valid KindleGen file. Please try re-downloading and re-installing Kindlegen.”

I deleted and reinstalled, but am getting the same message. I’ve tried moving the Kindlegen file into my Applications folder, as well as to other locations on my hard drive, to no avail.

I’m using a 2009 intel MacBook Pro running OSX 10.6.8.

Thanks for any help you might be able to offer!

BTW, I did find another thread dealing with the same issue, but there were no responses to it:

This error message means that KindleGen has thrown an exception (an error) when Scrivener tried to run it. So, unfortunately, it’s a little difficult to debug on our end, because the error is coming from KindleGen, not from Scrivener. Have you definitely directed Scrivener to the kindlegen executable file (the black “kindlegen” file inside the KindleGen folder)?

All the best,

Also, when running into problems with KindleGen, the first thing you want to do is tick the “Save the KindleGen log file with the exported Kindle file”, in the KindleGen compile option pane. That will print out a text file in the compile location you choose, even if no .mobi can be created. The contents may be a little technical, so if you can’t make sense of them, paste them here and we can try and decipher the problem from that.

If the log file doesn’t even get created, then something is wrong with running KindleGen. I would suspect permissions. I think some zip programs (StuffIt, maybe) do not correctly set the executable bit on the kindlegen program, meaning you don’t have permission to run it. This is easy to fix. Use the “Go” menu in Finder to select “Utilities”. Double-click the Terminal icon, and copy and paste the below into that window:

chmod a+x

Put a space after the ‘x’, and then drag and drop the ‘kindlegen’ file that Keith describes into this Terminal window. You should see a path get pasted into the window. Hit return to run the command, and try compiling again.

Wow…thanks so much for your responses!

Aha! The only file you could be referring to is white, not black (and yes, that’s the one I was pointing Scrivener at).

Aha! Since you suggested that it might be an issue with the zip program I had used (Zipeg), I tried unzipping using a different utility (Archive Utility) and the Kindlegen file is now black…and it’s working properly!

Thanks again so much!

Excellent, glad it’s working. The executable permission was precisely the problem. Without that “+x” the OS just thinks it is a file, not a program, so you get a white icon. Re-building it with Archive Utility is probably an easier solution to give people than Terminal. :slight_smile:

Great, glad you’re up and running!
All the best,