View Single Post
Old 05-11-2012, 08:25 AM   #9
Dirk2718
Enthusiast
Dirk2718 has learned how to buy an e-book online
 
Posts: 30
Karma: 88
Join Date: Apr 2012
Device: Kindle Touch (5.1.0)
So I created the example from the program mode with the three custom columns, which works very well.

I first tried to implement the green code below as a program in the "Template Functions", but I got the following failure notice:
Code:
calibre, version 0.8.51
ERROR: Template functions: Exception while compiling function

Traceback (most recent call last):
  File "site-packages\calibre\gui2\preferences\template_functions.py", line 169, in create_button_clicked
  File "site-packages\calibre\utils\formatter_functions.py", line 1201, in compile_user_function
  File "<string>", line 5
    program:
           ^
SyntaxError: invalid syntax
Did I use the wrong location, or why didnīt the template understand "program"?

Best regards
Dirk
Dirk2718 is offline   Reply With Quote