Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 06-21-2014, 05:11 AM   #1
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Remove unused CSS Rules

Hi Kovid,

I have an unhandled exception with removing unused css rules due to a not existing file.

Is only as information as this is an mistake in the epub and I will adjust this in the book.

Calibre error message:
Spoiler:
calibre, version 1.41.0
ERROR: Unhandled exception: <b>KeyError</b>:u'text/page-template.xpgt'

calibre 1.41* [64bit] isfrozen: True is64bit: True
Windows-Vista-6.0.6002-SP2 Windows ('64bit', 'WindowsPE')
('Windows', 'Vista', '6.0.6002')
Python 2.7.5
Windows: ('Vista', '6.0.6002', 'SP2', 'Multiprocessor Free')
Traceback (most recent call last):
File "c:\home\kovid\work\calibre\src\calibre\gui2\tweak _book\boss.py", line 439, in polish
File "c:\home\kovid\work\calibre\src\calibre\ebooks\oeb \polish\main.py", line 247, in tweak_polish
File "c:\home\kovid\work\calibre\src\calibre\ebooks\oeb \polish\main.py", line 202, in polish_one
File "c:\home\kovid\work\calibre\src\calibre\ebooks\oeb \polish\css.py", line 190, in remove_unused_css
KeyError: u'text/page-template.xpgt'


Error caused by missing file:
Spoiler:
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
Divingduck is offline   Reply With Quote
Old 06-21-2014, 06:39 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You should run check book and fix the errors before using any automated tools like remove unused css. The automated tools are not designed to be robust against all possible errors in the book.

EDIT: However, I have made it robust against this particular error at any rate. https://github.com/kovidgoyal/calibr...b7a45940a669d0

Last edited by kovidgoyal; 06-21-2014 at 06:43 AM.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-21-2014, 07:51 AM   #3
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
A stupid thing, indeed. This was one of my books in my test library. I corrected the book in my regular library long time ago and forgot afterwards the modification , as I saw later today
Thanks.
Divingduck is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS to indent paragraphs and remove spaces Alda Sigil 7 06-20-2014 05:36 AM
New "remove unused css" tool BobC Editor 4 01-25-2014 09:06 PM
Remove border css pvalle29 Conversion 6 11-27-2013 04:24 AM
In an ePub reader, what are the rules for processing styles/CSS? mattcurtis ePub 1 04-05-2013 11:11 AM
Conditional CSS rules Jellby ePub 10 01-20-2009 08:32 AM


All times are GMT -4. The time now is 05:36 PM.


MobileRead.com is a privately owned, operated and funded community.