![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Problem with converting very simple HTML file with table
Using calibre 0.6.12 for linux on Ubuntu 9.04 32-bit.
I tried using the commandline: Code:
ebook-convert test.html test.txt Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>test table</title> </head> <body> <table> <tr><td>Upper Left</td><td>Upper Right</td></tr> <tr><td>Lower Left</td><td>Lower Right</td></tr> </table> </body> </html> Code:
Traceback (most recent call last): File "/tmp/init.py", line 47, in <module> File "/home/kovid/build/calibre/src/calibre/ebooks/conversion/cli.py", line 249, in main File "/home/kovid/build/calibre/src/calibre/ebooks/conversion/plumber.py", line 717, in run File "/home/kovid/build/calibre/src/calibre/customize/conversion.py", line 208, in __call__ File "/home/kovid/build/calibre/src/calibre/ebooks/html/input.py", line 285, in convert File "/home/kovid/build/calibre/src/calibre/ebooks/html/input.py", line 336, in create_oebbook File "/home/kovid/build/calibre/src/calibre/ebooks/oeb/base.py", line 409, in __init__ File "/home/kovid/build/calibre/src/calibre/ebooks/oeb/base.py", line 437, in namelist File "/usr/lib/python2.6/os.py", line 294, in walk for x in walk(path, topdown, onerror, followlinks): File "/usr/lib/python2.6/os.py", line 294, in walk for x in walk(path, topdown, onerror, followlinks): File "/usr/lib/python2.6/os.py", line 294, in walk for x in walk(path, topdown, onerror, followlinks): File "/usr/lib/python2.6/os.py", line 284, in walk if isdir(join(top, name)): File "/usr/lib/python2.6/genericpath.py", line 41, in isdir st = os.stat(s) KeyboardInterrupt Anyway, why was I bothering converting such a pitiful little file? Well, I was trying to diagnose another problem I was having with ebook-convert when converting either HTML or ePub to plain text. In particular, it wasn't putting in a linefeed between rows of a table, unless I used the --linearize-tables option. However, then it puts in linefeeds even between columns in the same row. Thus, assuming the above file had worked at all, without ---linearize-tables, I would have got: Code:
Upper LeftUpper RightLower LeftLower Right Code:
Upper Left Upper Right Lower Left Lower Right Code:
Upper left Upper right Lower left Lower right Last edited by frabjous; 09-18-2009 at 09:23 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Worked for me in under 3 seconds. try creating an empty directory, putting test.html in it and then running ebook-convert, the problem seems to be some sort of infinite link loop in the directory in which you've put test.html
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
OK, that helps... although should it really matter if that file has no links in it?
Still, I get: Code:
Upper LeftUpper RightLower LeftLower Right Code:
Upper Left Upper Right Lower Left Lower Right Quote:
I suppose I could preprocess my files with some sed scripts, but I'd think for ebook conversion, putting one row of a table per line of text would make sense. Last edited by frabjous; 09-18-2009 at 02:19 PM. |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Open a ticket for it and user_none (who wrote the TXT output, will comment)
the links in question are file system links not links in the file. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents - html to Mobi problem | thames | Calibre | 3 | 06-02-2010 07:24 PM |
Need help converting file which is too long to be HTML | ficbot | Workshop | 8 | 04-06-2010 11:45 PM |
Small HTML file won't finish converting | AlexBell | Calibre | 2 | 07-06-2009 06:15 AM |
Problem converting HTML to Mobi | AprilHare | Calibre | 3 | 05-02-2009 09:34 PM |
converting lit html output into one big file for BD | Dave Berk | Sony Reader | 15 | 03-29-2007 10:02 PM |