View Single Post
Old 01-24-2018, 12:05 AM   #7
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by thinkulum View Post
I think the error is generated by the Python library cssutils, which Calibre uses. "Missing token for production" shows up here. It's the kind of language parsers use.

A parser interprets a file based on a formal grammar that expects certain chunks of text (or other data) in certain orders. A token is a combination of one of those chunks and a name that identifies its category so the parser knows what to do with it. A production is one of the rules of the grammar.

So in this case it looks like the parser figured out it was looking at a property, but then instead of something matching the kinds of property value it was expecting (something from the list in Choice), it found "#00007."

Ideally I think Calibre should translate errors like that into something more readable instead of just passing them along to the user.
I played with it a bit, and managed to nuke it. Somehow, whomever had built the original ePUB had coded a background "color" for the cover page (nope, don't know why). That caused the issues. I simply nuked it, rather than puzzling out the whys and wherefores of the coding. The client was paying SOLELY to "fix" the ePUBs, which did not pass ePUBcheck, so..clean file was my only goal.

Thanks for the insight. I've saved the thread and your comments to delve into another time when I have some time for that type of fun investigation.

Hitch
Hitch is offline   Reply With Quote