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-19-2015, 07:24 AM   #1
lealla
Enthusiast
lealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enough
 
lealla's Avatar
 
Posts: 39
Karma: 714
Join Date: Jun 2015
Device: Kobo Aura H2O
Xpath error for splitting html/creating TOC

Hi all!

First post and all, hoping for some advice on xpath in Calibre Edit Book.

I had it all working beautifully using xpath to find chapters, split the html and create toc links from the individual files.

Suddenly, this doesn't work anymore.

If I run

(//*[re:test(., "Chapter", "i")])

- on any file, I get an error saying:

Quote:
ERROR Unhandled Exception

AbortError Cannot split on the
tag.

calibre, version 2.31.0
ERROR: Unhandled exception: <b>AbortError</b>:Cannot split on the <body> tag

calibre 2.31 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: EpubMerge && EpubSplit && Goodreads
Traceback (most recent call last):
File "site-packages\calibre\gui2\tweak_book\boss.py", line 1059, in multisplit
File "site-packages\calibre\ebooks\oeb\polish\split.py", line 266, in multisplit
AbortError: Cannot split on the <body> tag




Any help would be greatly appreciated.

I have tried resetting all options to default, with no luck.

I'm wondering now if I'm accidentally putting in the wrong xpath code, and somehow changed it without noticing.

If I have the wrong code for "find all instances of the word 'chapter' and split document, please correct me!
I'm using: (//*[re:test(., "Chapter", "i")]) right now. I thought I'd been using it all along, but now I'm not so sure!

Thank you!
lealla is offline   Reply With Quote
Old 07-01-2015, 03:20 AM   #2
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)
Perhaps the content you are trying to split on is just raw text dumped in the html <body> element, rather than in a <p> tag?
eschwartz is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an html TOC in Sigil holdit Sigil 3 11-13-2014 11:17 PM
Creating TOC and splitting into several xhtml files Julius Caesar Kindle Formats 1 08-31-2013 09:26 AM
Creating an HTML TOC for kindlegen MrB Kindle Formats 2 10-28-2012 02:53 PM
HTML to EPUB TOC Creation XPath HoushaSen Conversion 1 03-13-2011 11:02 AM
TOC error when converting HTML poloman Calibre 2 12-14-2008 04:05 PM


All times are GMT -4. The time now is 07:03 AM.


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