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 10-01-2014, 05:21 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,073
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Diaps Editing Toolbag.zip Index Error

I tried to do a

Delete 'div' with no attributes

and got an Index error


The json files are date stamped 8/12/2014

Code:
calibre, version 2.4.0
ERROR: Unhandled exception: <b>IndexError</b>:list index out of range

calibre 2.4 [64bit]  isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.8
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: EpubMerge && Generate Cover && Open With && Quality Check && Diaps Editing Toolbag && Favourites Menu && Manage Series && Modify ePub
Traceback (most recent call last):
  File "calibre_plugins.diaps_toolbag.dialogs", line 493, in do_action
  File "calibre_plugins.diaps_toolbag.main", line 130, in delete_modify
  File "calibre_plugins.diaps_toolbag.resources.html_parser", line 256, in processml
IndexError: list index out of range
The epub file is pretty simple:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Interesting Times</title>
  <link href="../epub17.css" rel="stylesheet" type="text/css"/>
  <link href="../Georgia.css" rel="stylesheet" type="text/css"/>
</head>

<body>
  <div>
    <p>There is a curse.</p>
    <br/>
    <p>They say:</p>
    <p>May You Live in Interesting Times</p>
  </div>
</body>
</html>
Any ideas??

Thanks
phossler is offline   Reply With Quote
Old 10-01-2014, 05:58 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I just copy/pasted that code into a new epub and everything worked as expected. Are you sure you don't have the plugin set to process ALL files in the epub, and it's in fact, a different file that's causing it to barf?

I have no doubt you may have found some markup that makes the algorithm barf, but it shouldn't be the code you posted.

Are you sure you have the very-latest posted version of the plugin? Version 0.3.0, I believe?

If that's the only file in the epub (or the only file you've told the plugin to process), and you're still getting the error, please attach a copy of that exact epub (if you can) so I can take a look.

Last edited by DiapDealer; 10-01-2014 at 06:22 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 10-01-2014, 08:05 PM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,073
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Good point - that happened to be the file in the edit window, so I didn't think that through too clearly (sorry about that)

Trying to recreate the steps and generate a repeatable failure case, I believe that if the HTML is malformed (likely in this case since I had been doing a lot of RE cleanup) then it will fail. Run Fix HTML and then it seems to be ok

I do have a epub that if you load it and run the PI to Delete naked <div>'s seems to reliably fail

If it's OK, I'd prefer to PM a Google Drive link to you instead of posting it in the forum.

Thanks for looking and as you might guess, your PI is really getting used

Last edited by phossler; 10-01-2014 at 08:10 PM.
phossler is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Index has too many entries... Katsunami Conversion 6 10-12-2013 09:06 AM
"Error importing EPUB. EOCD not found. Not a ZIP archive? (Error Code 1068)" oren ePub 8 02-20-2012 07:20 AM
"Error importing EPUB. EOCD not found. Not a ZIP archive? (Error Code 1068)" oren Android Devices 1 02-20-2012 04:10 AM


All times are GMT -4. The time now is 11:40 PM.


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