![]() |
#1 |
Junky
![]() Posts: 29
Karma: 58
Join Date: Jul 2008
Location: Denton, Tx
Device: Sony PRS-505 and REB-1100
|
lit conversion error
It's me again. I get this error when conerting a .lit file to .lrf
![]() ('TypeError', u"'NoneType' object is unsubscriptable"): Failed to perform job: Convert book:C:/Documents and Settings/Glenn Finch/My Documents/My E-Books/Brust, Steven - Vlad Taltos 02 - Yendi.lit Detailed traceback: Traceback (most recent call last): File "parallel.py", line 755, in worker File "parallel.py", line 724, in work File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\c onvert_from.py", line 167, in main File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\c onvert_from.py", line 137, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\lit\c onvert_from.py", line 72, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ opf.py", line 402, in __init__ File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ opf.py", line 129, in from_opf_spine_element File "C:\Program Files\calibre\library.zip\calibre\ebooks\metadata\ opf.py", line 119, in __init__ File "calibre\ebooks\metadata\__init__.pyo", line 56, in __init__ File "ntpath.pyo", line 53, in isabs File "ntpath.pyo", line 119, in splitdrive TypeError: 'NoneType' object is unsubscriptable Log: [DEBUG] convert_from.py:46: ['clit', u'c:\\docume~1\\glennf~1\\locals~1\\temp\\calibre_ 0.4.80_cq-cxk.lit', 'c:\\docume~1\\glennf~1\\locals~1\\temp\\calibre_x y59v-\\'] [INFO] convert_from.py:50: As alway thanks in advance. ![]() |
![]() |
![]() |
![]() |
#2 |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
This may have nothing to do with your .LIT conversion error but it may prove useful. https://wiki.mobileread.com/wiki/Fix_Lit
|
![]() |
![]() |
![]() |
#4 | |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
Quote:
These issues are not the same, IMHO. First off a basic explanation of the two issues - ConvertLIT has a bug which will cause references to files sharing a common filename prefix to all refer to the shortest-named so-prefixed file. My fix has nothing to do with fixing this error (which is a somewhat similar error that I have not encountered) but only to fix NOTES links where after conversion you would find all your notes links would bring you back to the Table of Contents page rather than to the note you wanted to read. Because in my ebooks CHAPTER links work in the exploded .LITs if browsing as webpages and only the NOTES links do not work. All NOTES links were pointing to, one example, 20002285toc.html (table of contents) rather than the main text 20002285.html. In this case the longer file name was being pointed to not the shorter (in your case you are talking about referring to a shorter file name only). Further, in my cases this was always the table of contents which was always a small .html. In my wiki article "smallest" meant .html file size not filename length. My fix seems to be unrelated to works of fiction and only occurs in non-fiction books that have a large number (several hundred) of NOTES links (as fiction books generally do not have hundreds of links). In your case I guess you would also be talking about Chapter links, in my cases these were perfect. What do you think? Last edited by shousa; 08-04-2008 at 01:31 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
No, they are the same. I just got myself backwards when thinking about what was causing the bug and put "shortest" when "a longer" was correct. This most commonly shows up with footnotes because you'll have files like note1.html, note2.html, ..., note44.html. ConvertLIT internally has a list of filename IDs which are usually the filename without the extension (note1, ..., note44). To fix-up the link it searches through this list, but does so in a way which doesn't distinguish between a full match and an initial substring match. So if it's looking for 'note1' and it finds 'note14' first, then it'll link to 'note14.html' instead of 'note1.html'.
Sorry for the confusion, but the good news is that in the future you can use calibre with 'lit2oeb' and not need fix things up by hand ![]() Hope this helps, -Marshall |
![]() |
![]() |
![]() |
#7 | |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
Quote:
However I did not have any notes links having the error you describe - the ebooks in question did not have footnotes but just a number after a sentence and then at the end of a chapter a list of note numbers each with the associated note text. There are no notes in the Table of contents pages which is what each note was linking to. So in my case everything about the link was correct, if note 14 it was note 14 never note 1. Only problem was it was searching in the Table of Conents page which had no note links at all. Could your problem be fixed by the same find and replace method that fixes mine? Note that it wasn't the longest or shortest filename that defined the error - just that it pointed to the table of contents.html Do you still think it is the same? Last edited by shousa; 08-04-2008 at 04:58 AM. |
|
![]() |
![]() |
![]() |
#8 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
I have edited the wiki to reflect my understanding of these 2 issues, as I see them.
I have included your text and as a whole it now seems to make sense. I had put in smallest and biggest to make it easier for newbies to use but on reflection I think it made it much harder....silly me. If you still think I am wrong lets keep the discussion going and work it out. Have made my explanation much more user friendly. I hope. Last edited by shousa; 08-04-2008 at 05:29 AM. |
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
I have edited the wiki to reflect my understanding of these 2 issues, as I see them.
Please feel free to change to reflect your understanding so we can nut this out. Here is the "top" of the wiki: There seem to be two issues when converting a .LIT Microsoft Reader file that occur with links embedded in an ebook for footnotes (bottom of each page) or other notes (end of each chapter). If your notes links do not work the deciding factors of which issue it is seems to be the following: * (1) The incorrectly-mapped hyperlink bug - notes links will be "randomly" incorrect. Occurs with ebooks with many notes files. eg note1.html, note2.html...etc * (2) The all notes hyperlinks point to the table of contents bug - notes links will all point to the table of contents.html even though there are no notes in there. Occurs with ebooks which have many notes in the main ebook's .html not as separate files. |
![]() |
![]() |
![]() |
#10 | |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#11 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
Sure, I'll give it a go.
Thanks for pointing out the possible fix - btw I only updated to Calibre just the other day and have not yet converted any ebooks with it. |
![]() |
![]() |
![]() |
#12 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
Tried it and you were right it worked. Good job by you to pick that.
This means Calibre solves both issues. It seems instead of 2 errors it was 1 error (incorrect hyperlinks) that had 2 different outcomes depending upon whether the ebook had the notes internally in the main.html or as individual notes.html (eg note1.html, note2.html etc). Updated wiki to reflect. Kovid never rests on his laurels does he! |
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,149
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This fix is entirely llasram's doing.
|
![]() |
![]() |
![]() |
#14 |
Groupie
![]() ![]() ![]() Posts: 181
Karma: 232
Join Date: May 2006
|
Thanks to llasram!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
conversion error | rheostaticsfan | Calibre | 2 | 09-16-2010 04:01 PM |
Conversion Error ? | JDługosz | Calibre | 4 | 07-04-2010 12:45 PM |
Book Error In Sigil After Calibre Conversion (from lit to epub) | Guns4Hire | Sigil | 13 | 03-05-2010 05:02 PM |
Conversion Error | athena416 | Calibre | 0 | 10-04-2009 02:45 AM |
Error: Conversion Error | Spectralist | Calibre | 1 | 08-08-2009 12:14 PM |