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 01-08-2014, 10:06 PM   #1
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
error in linking stylesheets

Tried to link stylesheet to list.xhtml and got this error. The file was imported, if that makes a difference.

Quote:
calibre, version 1.18.0
ERROR: Unhandled exception: <b>TypeError</b>:Argument 'element' has incorrect type (expected lxml.etree._Element, got unicode)

calibre 1.18 isfrozen: True is64bit: False
Linux-3.2.0-57-generic-pae-i686-athlon-with-debian-wheezy-sid Linux ('32bit', 'ELF')
('Linux', '3.2.0-57-generic-pae', '#87-Ubuntu SMP Tue Nov 12 21:57:43 UTC 2013')
Python 2.7.5
Linux: ('debian', 'wheezy/sid', '')
Traceback (most recent call last):
File "site-packages/calibre/gui2/tweak_book/boss.py", line 72, in ans
File "site-packages/calibre/gui2/tweak_book/boss.py", line 872, in link_stylesheets_requested
File "site-packages/calibre/ebooks/oeb/polish/utils.py", line 62, in link_stylesheets
File "site-packages/calibre/ebooks/oeb/polish/container.py", line 622, in insert_into_xml
TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got unicode)
Attached Files
File Type: epub Peter's Evil Overlord List - eviloverlord.com.epub (109.8 KB, 432 views)
eschwartz is offline   Reply With Quote
Old 01-08-2014, 10:53 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,021
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Same file XP calibre 1.18
Code:
calibre, version 1.18.0
ERROR: Unhandled exception: <b>TypeError</b>:Argument 'element' has incorrect type (expected lxml.etree._Element, got unicode)

calibre 1.18  isfrozen: True is64bit: False
Windows-XP-5.1.2600-SP3 Windows ('32bit', 'WindowsPE')
('Windows', 'XP', '5.1.2600')
Python 2.7.5
Windows: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free')
Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\boss.py", line 72, in ans
  File "site-packages\calibre\gui2\tweak_book\boss.py", line 872, in link_stylesheets_requested
  File "site-packages\calibre\ebooks\oeb\polish\utils.py", line 62, in link_stylesheets
  File "site-packages\calibre\ebooks\oeb\polish\container.py", line 622, in insert_into_xml
TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got unicode)
theducks is offline   Reply With Quote
Advert
Old 01-09-2014, 01:24 AM   #3
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: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
list.xhtml is missing its xhtml namespace declaration. Put that in and you will be fine. However, edit book should automatically catch the case of valid XML with no namespace declaration, which will be in the next release.
kovidgoyal is offline   Reply With Quote
Old 01-09-2014, 02:25 AM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yes, that fixed it. Funny, though -- I'd've thought fix/beautify should catch that? Check Book didn't notice it either.

Maybe that is also why an azw3 conversion could not track the stylesheet, and once packaged in azw3 structure still tried to link to the old location I manually put in?
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom CSS Stylesheets for Calibre's Viewer Ralob Viewer 389 11-24-2024 11:10 AM
Validate Stylesheets opens with ADE Moonraker Sigil 3 11-05-2012 09:56 AM
Alternate stylesheets Jellby ePub 1 08-19-2011 06:44 PM
eReader apps that do use embedded CSS 'stylesheets' jttraverse Android Devices 7 05-20-2011 12:28 AM
User stylesheets for ePub files salty-horse Sony Reader Dev Corner 12 02-23-2010 07:44 AM


All times are GMT -4. The time now is 10:53 AM.


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