Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2014, 10:43 AM   #1
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
command line "calibredb catalog" problems

Kovid,

something is going wrong with command line interface 'calibredb catalog' in windows. I can do things like: 'calibredb catalog Katalog.csv --fields=authors,title --sort-by=timestamp'

However, what is not working is i.e. 'calibredb catalog Katalog.epub' where I get this error
Spoiler:
Code:
*** No Section switches specified, enabling all Sections ***
 Sections: Authors, Titles, Series, Genres, Recently Added, Descriptions
Python function terminated unexpectedly
  'NoneType' object has no attribute '__getitem__' (Error Code: 1)

please see first picture.

If I add '--fields=authors' I got only new errors. Guess it is not for epub and applies only for csv and xml?

An additional point, if I do a help request, the printed output looks very ugly.
i.e.: 'calibredb catalog Katalog.csv --help' (second picture)

I'am a bit lost on this. Is it me or an error?
Attached Thumbnails
Click image for larger version

Name:	Aufzeichnencl1.JPG
Views:	433
Size:	73.3 KB
ID:	118878   Click image for larger version

Name:	Aufzeichnencl2.JPG
Views:	458
Size:	97.4 KB
ID:	118879  
Divingduck is offline   Reply With Quote
Old 02-09-2014, 11:44 AM   #2
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: 44,423
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In the first picture your error is likely caused by a stale setting for the genre source field. You will have to change that in the main calibre program.

The ugliness is probably because you have a non-utf8 windows console. Trying to get correct output for all the combinations of windows encodings + console encodings out there is impossible.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-09-2014, 11:58 AM   #3
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: 44,423
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually no the ugly output is specific to calibredb catalog --help (without a filename) and windows. Fix will be in next release.
kovidgoyal is offline   Reply With Quote
Old 02-09-2014, 02:31 PM   #4
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Quote:
Originally Posted by kovidgoyal View Post
In the first picture your error is likely caused by a stale setting for the genre source field. You will have to change that in the main calibre program.

I had just change the Gui-language to English and try to do the command line catalog again and to my surprise it works. Going back to German the error is back again. Same to some other language. I check it for some other like Italian, Spain and French. Same behavior. Going back to English and it works again. It looks like there is a problem in this area.

PS: forgot to tell, it is the actual Calibre (patched) version

Last edited by Divingduck; 02-09-2014 at 02:36 PM.
Divingduck is offline   Reply With Quote
Old 02-09-2014, 09:16 PM   #5
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: 44,423
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...f2e4497eceeec4
kovidgoyal is offline   Reply With Quote
Advert
Old 02-10-2014, 06:34 AM   #6
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Thanks
Divingduck is offline   Reply With Quote
Old 02-10-2014, 08:00 AM   #7
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Kovid,
just a thought for somewhen in the fare future, if you like to do.
It would be nice to have a little bit more flexible epub catalog output from command line. Why not using a stored preset from the Gui-Version as an additional call option from the command line interface.
Divingduck is offline   Reply With Quote
Old 02-10-2014, 08:08 AM   #8
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: 44,423
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can specify all the setting from the GUI on the CLI as well, see

calibredb catalog file.epub -h

It is important to include the file.epub as well to see all the options available for epub catalogs.
kovidgoyal is offline   Reply With Quote
Old 02-10-2014, 08:25 AM   #9
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
AAAAAAAAAAAAAAAAAAAAAH.
I did the same mistake once more.

You need to give more hints in the help file please.

Thanks again.
Divingduck is offline   Reply With Quote
Old 02-10-2014, 08:53 AM   #10
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Hope, it is ok to make a last additional post on this.

I got this python error if I use the help-option (calibredb catalog file.epub -h) at the end of the report.
Attached Thumbnails
Click image for larger version

Name:	Aufzeichnencl3.JPG
Views:	323
Size:	104.8 KB
ID:	118917  
Divingduck is offline   Reply With Quote
Old 02-10-2014, 12:35 PM   #11
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: 44,423
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...0ca132cacab582
kovidgoyal is offline   Reply With Quote
Old 02-10-2014, 01:11 PM   #12
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Thank you.
Divingduck is offline   Reply With Quote
Old 12-26-2014, 05:01 PM   #13
rracoon01
Connoisseur
rracoon01 began at the beginning.
 
rracoon01's Avatar
 
Posts: 88
Karma: 10
Join Date: Nov 2013
Device: android tablets
Python runtime error in calibredb catalog batch log

I have a batch job to make a couple of catalogs of my Calibre db with just one click. I have been having trouble getting the job to exclude one tag in the output. The command line references a preset which I use to get only the sections that I want output to the catalog. Would not use the preset at all if sections were one of the command line options but I can’t find any docs to that effect. While debugging this, I encountered a runtime error that I had not noticed when I originally wrote the batch program last winter; appears to be relatively new. Can you help me figure out what to do to figure out what this error is from the excerpt of batch log below. I cannot find the directory noted in the error message. Note also that I moved the exclusion filters for the tags from the preset and into the batch file in an effort to decipher my original problem and the verbosity of the output from the command line in the batch log file shrunk dramatically but the results were the same. It used to list which books were excluded by which tag and the error message was issued during that list as well as at the end. When I put the tag exclusions back in the preset to give you more information, the verbosity did not come back. Note that the error message occurs in both of the catalog creations in this batch log, but that the first command successfully excludes all of the tags correctly, while the second one continues to include one book that does have all of the tags that should have been excluded in the command line.

Excerpt from the batch log:

C:\Users\rracoon\Documents\EPUB Stuff>rem create the catalogs

C:\Users\rracoon\Documents\EPUB Stuff>calibredb catalog "C:\Users\rracoon\Documents\Calibre Library\Allen Williams\Allen's eBook Shelf (365)\Allen's eBook Shelf - Allen Williams.EPUB" --preset="Allen's Catalogs" --search=format:true and not tags:Catalog and not tagsrivate and not tags:news
Sections: Authors, Titles, Genres, Recently Added, Descriptions
existing thumb cache at C:\Users\rracoon\AppData\Local\calibre-cache\catalog\thumbs.zip, cached_thumb_width: 1.00"
1% Sorting titles
7% Sorting database
13% Thumbnails
unhandled exception in catalog generator
Python function terminated unexpectedly
File name in directory "97b09aed-cdd4-4d8b17734c-6356-47be-ae2c-209a7d" and header "97b09aed-cdd4-4d8b-9bf9-8efd55fc7c6b0x65cd7d2d" differ. (Error Code: 1)

C:\Users\rracoon\Documents\EPUB Stuff>if 0 == 1 pause

C:\Users\rracoon\Documents\EPUB Stuff>calibredb catalog "C:\Users\rracoon\Documents\Calibre Library\Allen Williams\Allen's Unread eBooks (367)\Allen's Unread eBooks - Allen Williams.EPUB" --preset="Allen's Catalogs" --search="#dateread:false and format:true" and not tags:Catalog and not tags:news
Sections: Authors, Titles, Genres, Recently Added, Descriptions
existing thumb cache at C:\Users\rracoon\AppData\Local\calibre-cache\catalog\thumbs.zip, cached_thumb_width: 1.00"
1% Sorting titles
7% Sorting database
13% Thumbnails
unhandled exception in catalog generator
Python function terminated unexpectedly
File name in directory "97b09aed-cdd4-4d8b17734c-6356-47be-ae2c-209a7d" and header "97b09aed-cdd4-4d8b-9bf9-8efd55fc7c6b0x65cd7d2d" differ. (Error Code: 1)
rracoon01 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fetched new per command line are not "marked" as news tetanos Library Management 2 04-26-2013 01:23 AM
How to categorise a book as "News" from command-line cptnemo Recipes 1 04-19-2013 03:46 AM
"Remove the dependency on the zip command line tool when developing plugins"? JimmXinu Plugins 2 07-13-2012 02:09 PM
Defining Metadata with "calibredb add" command line function. macr0t0r Calibre 3 03-01-2012 07:36 PM
iLiad "joe" command line text editor bobj iRex Developer's Corner 3 06-02-2008 03:03 PM


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


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