Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 07-12-2009, 11:37 PM   #481
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Hey, when you use ebook-convert's --chapter= option, how are you supposed to delineate the XPath expression if the expression contains quotation marks (or just in general, really)? Do you do:

ebook-convert file1.html file2.lrf --chapter=//h2[@class="Chapter"]

or

ebook-convert file1.html file2.lrf --chapter="//h2[@class="Chapter"]"

or

ebook-convert file1.html file2.lrf --chapter='//h2[@class="Chapter"]'

or what? I've tried it all three ways, and the first two don't work at all while the third way gives me the following error:

Code:
Merging user specified metadata...
Detecting structure...
Traceback (most recent call last):
  File "cli.py", line 234, in <module>
  File "cli.py", line 226, in main
  File "calibre\ebooks\conversion\plumber.pyo", line 664, in run
  File "calibre\ebooks\oeb\transforms\structure.pyo", line 32, in __call__
  File "calibre\ebooks\oeb\transforms\structure.pyo", line 80, in detect_chapters
AttributeError: 'str' object has no attribute 'xpath'
chorpler is offline  
Old 07-12-2009, 11:41 PM   #482
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,417
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The command line generally sucks in windows. Your third example is the way I would do it and it works under linux. Here's another to try

Code:
--chapter "whatever \"in quotes\" not in quotes"
kovidgoyal is offline  
Advert
Old 07-12-2009, 11:51 PM   #483
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Thanks Kovid (is that your first name?), I figured it was a Windows command-line interpretation problem. Since I do my conversions from the command-line anyway, maybe I should just switch over to using calibre in my Linux shell.
chorpler is offline  
Old 07-13-2009, 01:16 AM   #484
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,417
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah, it is Kovid
kovidgoyal is offline  
Old 07-13-2009, 05:44 AM   #485
jesscat
Groupie
jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.jesscat has a complete set of Star Wars action figures.
 
Posts: 164
Karma: 354
Join Date: Mar 2009
Location: US
Device: iPad mini
I'm having the same problem as msr with multiple authors. I can get it to work if I separate the authors with a comma, but not with an ampersand (I seem to recall an ampersand used to work?). For two authors separated by an ampersand - if I edit the metadata, the second one always disappears.

Also, re: Reign's comment - my Calibre library sorts just fine, but my Kindle sorts on the Author field, not the Author Sort field. So if I have first name, last name in the Author field, and last name, first name, in the Author Sort field, my Calibre library sorts on last name, but Kindle sorts on first name (this is clear not just on the Kindle itself, but even in Calibre when I sort by author on my device). I figured this was just a Kindle thing and haven't worried about it, but maybe I'm wrong about this?

(But I just want to say - I'm a new Calibre user, didn't think I needed anything like this for my first five or six months with the Kindle, and I was wrong - it's an amazing piece of software, and I'm very impressed and grateful!)
jesscat is offline  
Advert
Old 07-13-2009, 07:25 AM   #486
Stingo
Fanatic
Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.Stingo ought to be getting tired of karma fortunes by now.
 
Stingo's Avatar
 
Posts: 582
Karma: 1334691
Join Date: Nov 2006
Location: Miami
Device: KH2O, KPW2, KDXG, KPW1, K3, S505
The Beta keeps running into new problems with conversion with each iteration.

I now can't convert HTML to MOBI. (I miss 5.14) Get the following:

Convert book 1 of 1 (u'To Say Nothing of the Dog')
InputFormatPlugin: HTML Input running on /Volumes/Media 1/E-Books/Calibre/Connie Willis/To Say Nothing of the Dog (1098)/To Say Nothing of the Dog - Connie Willis.html
Language not specified
Creator not specified
Building file list...
Found files...
HTMLFile:0:a:/Volumes/Media 1/E-Books/Calibre/Connie Willis/To Say Nothing of the Dog (1098)/To Say Nothing of the Dog - Connie Willis.html
Parsing To%20Say%20Nothing%20of%20the%20Dog%20-%20Connie%20Willis.html ...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Parsing stylesheet.css ...
Creating MOBI Output...
Applying case-transforming CSS...
Parsing manglecase.css ...
Rasterizing SVG images...
Converting XHTML to Mobipocket markup...
Serializing markup content...
Compressing markup content...
Generating flat CTOC ...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/E-Book-tools/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/utils/ipc/worker.py", line 90, in main
File "calibre/gui2/convert/gui_conversion.pyo", line 17, in gui_convert
File "calibre/ebooks/conversion/plumber.pyo", line 725, in run
File "calibre/ebooks/mobi/output.pyo", line 132, in convert
File "calibre/ebooks/mobi/writer.pyo", line 356, in __call__
File "calibre/ebooks/mobi/writer.pyo", line 369, in _dump_stream
File "calibre/ebooks/mobi/writer.pyo", line 376, in _generate_content
File "calibre/ebooks/mobi/writer.pyo", line 1232, in _generate_text
File "calibre/ebooks/mobi/writer.pyo", line 1960, in _generate_ctoc
KeyError: None

Tried HTML -> EPUB -> MOBI but also failed.
Stingo is offline  
Old 07-13-2009, 10:45 AM   #487
zerospinboson
"Assume a can opener..."
zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.
 
zerospinboson's Avatar
 
Posts: 755
Karma: 1942109
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
when importing covers using the download service, the jpegs are corrupted during saving to the directory (it displays fine until you exit the properties screen) (at least in b10-11).
Also, why is it possible to add .doc files to the library if you can't convert from them to any other format?
zerospinboson is offline  
Old 07-13-2009, 12:14 PM   #488
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,417
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@jesscat: There was a bug in the author sort propagation during conversion that has now been fixed. Try b13

@Stingo: Open a ticket and attach the file

@zerospinboson: I don't see this behavior. What do you mean by corrupted? And you can add a lot of file types that cannot be converted. In fact you can add pretty much any file type under the sun.
kovidgoyal is offline  
Old 07-13-2009, 12:38 PM   #489
myle00
Connoisseur
myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.myle00 has a complete set of Star Wars action figures.
 
myle00's Avatar
 
Posts: 71
Karma: 422
Join Date: Jun 2009
Device: Palm Treo
Metadata?

A few more things with metadata on beta 12 on Windows Vista. First, I noticed that when I edit the title of a book I find in the trash a copy of the original folder with the book. Not that the book is deleted, but that it sends a copy to the trash. I also found that when I click "get metadata and covers" it send 2 copies to the trash, one is the original folder and the other is the folder with the new name.

Also, when I click "get metadata and covers" on more than a hundred files at a time it crashes after some time. Usually it does get metadata for some files. Out of 5 times it crashed 3 and the other time it gave me this error but didn't crash.
Code:
Traceback (most recent call last):
  File "calibre\gui2\tag_view.pyo", line 43, in recount
  File "calibre\gui2\tag_view.pyo", line 119, in refresh
RuntimeError: underlying C/C++ object has been deleted
It may be tied in with my previous posts that calibre only gets metatdata for some of the files and ignores the others even though I know it got the metadata from isbndb. But I can't really make sure that it still happens in this beta because it crashes. I'm going to try and add more files to see if it happens.

Thanks,
M
myle00 is offline  
Old 07-13-2009, 02:05 PM   #490
mandie
Junior Member
mandie began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Location: Iowa
Device: Kindle 2
I'm having some issues with adding a cover to the mobi files in my calibre library. The image appears within the library, but the cover does not transfer over to my kindle when I use calibre to send it to the device. The rest of the metadata (author and title) is fine. I have also tried converting the file to mobi format again, but it will not allow me to and I get this error:

Quote:
Convert book 1 of 1 (u'Bought With His Name')
InputFormatPlugin: MOBI Input running on C:\Users\Amanda\Documents\ebook library\Penny Jordan\Bought With His Name (398)\Bought With His Name - Penny Jordan.mobi
Extracting text...
Adding anchors...
Extracting images...
Cleaning up HTML...
Parsing HTML...
Converting style information to CSS...
Creating OPF...
Parsing all content...
Parsing Penny_Jordan-_With_His_Name.html ...
Parsing styles.css ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entires.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Parsing stylesheet.css ...
Creating MOBI Output...
Applying case-transforming CSS...
Parsing manglecase.css ...
Rasterizing SVG images...
Converting XHTML to Mobipocket markup...
Serializing markup content...
Compressing markup content...
Generating flat CTOC ...
Traceback (most recent call last):
File "worker.py", line 103, in <module>
File "worker.py", line 90, in main
File "calibre\gui2\convert\gui_conversion.pyo", line 17, in gui_convert
File "calibre\ebooks\conversion\plumber.pyo", line 725, in run
File "calibre\ebooks\mobi\output.pyo", line 132, in convert
File "calibre\ebooks\mobi\writer.pyo", line 357, in __call__
File "calibre\ebooks\mobi\writer.pyo", line 369, in _dump_stream
File "calibre\ebooks\mobi\writer.pyo", line376, in _generate_content
File "calibre\ebooks\mobi\writer.pyo", line 1232, in _generate_text
File "calibre\ebooks\mobi\writer.pyo", line 1960, in _generate_ctoc
KeyError: None
I have also been getting this error when trying to convert azw files (which I converted from pdf, doc, whatever using the free kindle conversion) to mobi--at first I wondered if this just couldn't be converted, but I was able to get about 5 of the 20 to convert, and I don't see any noticeable differences between any of the files.

Thank you so much!

Last edited by mandie; 07-13-2009 at 02:13 PM.
mandie is offline  
Old 07-13-2009, 02:11 PM   #491
ascherjim
Addict
ascherjim has a complete set of Star Wars action figures.ascherjim has a complete set of Star Wars action figures.ascherjim has a complete set of Star Wars action figures.
 
Posts: 260
Karma: 274
Join Date: Apr 2006
Location: Gig Harbor, Washington
Device: BeBook One, PocketBook 360, Kindle Paperwhite, Kobo Aura One
Quote:
Originally Posted by Stingo View Post
The Beta keeps running into new problems with conversion with each iteration.

I now can't convert HTML to MOBI. (I miss 5.14) Get the following:

Convert book 1 of 1 (u'To Say Nothing of the Dog')
InputFormatPlugin: HTML Input running on /Volumes/Media 1/E-Books/Calibre/Connie Willis/To Say Nothing of the Dog (1098)/To Say Nothing of the Dog - Connie Willis.html
Language not specified
Creator not specified
Building file list...
Found files...
HTMLFile:0:a:/Volumes/Media 1/E-Books/Calibre/Connie Willis/To Say Nothing of the Dog (1098)/To Say Nothing of the Dog - Connie Willis.html
Parsing To%20Say%20Nothing%20of%20the%20Dog%20-%20Connie%20Willis.html ...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Parsing stylesheet.css ...
Creating MOBI Output...
Applying case-transforming CSS...
Parsing manglecase.css ...
Rasterizing SVG images...
Converting XHTML to Mobipocket markup...
Serializing markup content...
Compressing markup content...
Generating flat CTOC ...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/E-Book-tools/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/utils/ipc/worker.py", line 90, in main
File "calibre/gui2/convert/gui_conversion.pyo", line 17, in gui_convert
File "calibre/ebooks/conversion/plumber.pyo", line 725, in run
File "calibre/ebooks/mobi/output.pyo", line 132, in convert
File "calibre/ebooks/mobi/writer.pyo", line 356, in __call__
File "calibre/ebooks/mobi/writer.pyo", line 369, in _dump_stream
File "calibre/ebooks/mobi/writer.pyo", line 376, in _generate_content
File "calibre/ebooks/mobi/writer.pyo", line 1232, in _generate_text
File "calibre/ebooks/mobi/writer.pyo", line 1960, in _generate_ctoc
KeyError: None

Tried HTML -> EPUB -> MOBI but also failed.
I've been having the same problem for some time now but have managed a quite satisfactory temporary fix (until Kovid gets this straightened out in his next beta) -- go back and load non-beta version 5(!), which makes the conversions fine! At least that works fine for me.
ascherjim is offline  
Old 07-13-2009, 02:35 PM   #492
zerospinboson
"Assume a can opener..."
zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.zerospinboson ought to be getting tired of karma fortunes by now.
 
zerospinboson's Avatar
 
Posts: 755
Karma: 1942109
Join Date: Mar 2008
Location: Local Cluster
Device: iLiad v2, DR1000
Quote:
Originally Posted by kovidgoyal View Post
@zerospinboson: I don't see this behavior. What do you mean by corrupted? And you can add a lot of file types that cannot be converted. In fact you can add pretty much any file type under the sun.
these are the covers for ISBN 9780345325815 and 9780006514831, uploaded 'as is' from the "download covers" function. Manually adding a cover also gives this result, although putting a cover.jpg file into the library entry's save directory manually does not result in a corrupted cover. Had this problem since b6 (first I tried), though I didn't report it before because I figured someone else would've.
Running win7 x64 (b7201). (And I can't currently check to see if this also happens on my WinXP installation on the same machine since I'm using remote desktop login)

Last edited by zerospinboson; 07-13-2009 at 02:38 PM.
zerospinboson is offline  
Old 07-13-2009, 02:44 PM   #493
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by ascherjim View Post
I've been having the same problem for some time now but have managed a quite satisfactory temporary fix (until Kovid gets this straightened out in his next beta) -- go back and load non-beta version 5(!), which makes the conversions fine! At least that works fine for me.
Lol, there's a reason for beta stage versions. Personally, I wouldn't use beta software in a production environment. If bugs can crop up in stable release versions, expect to see more of them in beta. I made a duplicate of my Calibre library and copied the whole thing over to a clean XP virtual machine for testing the 0.6 betas.
ilovejedd is offline  
Old 07-13-2009, 05:14 PM   #494
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,417
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@mandie: Open a ticket and attach the file causing the error
kovidgoyal is offline  
Old 07-13-2009, 05:16 PM   #495
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,417
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@zerospinboson: I definitely can't replicate this in win xp/vista and I don't have a win 7 install to test on
kovidgoyal is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre metadata.calibre not allowing updates Chuckels550 Calibre 10 08-09-2010 05:12 PM
Using Calibre as a client for another Calibre instance? toddos Calibre 27 06-30-2010 04:57 AM
Sigil 0.2.0 betas available Valloric Sigil 98 05-03-2010 04:07 PM
cannot open calibre on osx 10.6-- "Calibre is already running" message jlip Calibre 4 01-02-2010 11:05 PM
calibre command line utilities and calibre defaults astrodad Calibre 2 08-07-2008 03:27 PM


All times are GMT -4. The time now is 09:52 AM.


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