|
|
#1 | |
|
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
|
|
|
|
|
#2 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,241
Karma: 61360164
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)
|
|
|
|
|
|
#3 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,600
Karma: 28548974
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.
|
|
|
|
|
|
#4 |
|
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Custom CSS Stylesheets for Calibre's Viewer | Ralob | Viewer | 392 | 10-26-2025 03:50 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 |