View Single Post
Old 11-06-2011, 11:43 PM   #1
Joe42
Junior Member
Joe42 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2011
Device: Nook Color
Question Saving to disk with "Unknown" in author field

Calibre can't handle having "Unknown" in the author field when saving to disk despite my save template working perfectly for anything else.

Here's my save template:
Code:
{author_sort[0]}/{author}/{series:||} {series_index:0>2s|| -} {title}
When I save to disk, my ebooks are saved with a simple folder & file name structure. Going by the first letter of the author's last name, a folder is created and named with that letter, then inside that folder another folder with the author's name is made, and inside that folder is where the file goes, and it get's named with just the title of the book.

Example:
Code:
A
   Will Adams
      The Alexander Cypher.epub
   Mark Ames
       Going Postal.epub

B
   Alan Ball
       American Beauty.epub
You get the idea.

Anyway, Calibre should just create a folder called "U" and inside that one called "Unknown" then drop the ebooks in there, but instead the python scripting breaks down and I get the following error, no folder structure for "U" is made and no file is saved:

Code:
	Traceback (most recent call last):
	  File "site-packages\calibre\library\save_to_disk.py", line 437, in save_serialized_to_disk
	  File "site-packages\calibre\library\save_to_disk.py", line 305, in do_save_book_to_disk
	ValueError: Failed to calculate path for save to disk. Template: {author_sort[0]}/{authors}/{series:||} {series_index:0>2s|| -} {title}
	Error: string index out of range
This error has been a constant pain in my backside since I started using Calibre somewhere in the version 6.xx area and it still exists with the latest version, 0.8.25.

Any ideas?
Joe42 is offline   Reply With Quote