Could you confirm the malfunction I encountered using fields in prefix/suffix?
This template (just an example) works on books with and without series/series_index:
Code:
{series:|{isbn}|}{title}
These surprisingly don't work on books without series/series_index:
Code:
{series_index:|{isbn}|}{title}
{series_index:||{isbn}}{title}
In both cases I get this error message (here for the first one):
Quote:
calibre, version 0.8.42
WARNING: Could not save some books: Could not save some books, Click the show details button to see which ones.
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: {series_index:|{isbn}|}{title}
Error: Single '}' encountered in format string
|
The only difference could be that series is a string whereas series_index is a number?
I wonder, why the field series_index is considered at all for books where it's empty. The
section "Advanced formatting" states:
Quote:
If field has no value, then the result will be the empty string (nothing); the prefix and suffix are ignored.
|