Quote:
Originally Posted by genoasalami
Hoping you can help with this error. I am trying to create a custom column for the annotations because I don't want them showing up in all my book descriptions, which is happening right now because of use of the default "comments" column. Following the directions in the help file produces the below error.
Code:
calibre, version 5.9.0
ERROR: Unhandled exception: <b>ConstraintError</b>:ConstraintError: UNIQUE constraint failed: custom_columns.label
calibre 5.9 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 36, 0) && DeDRM (7, 0, 3) && Package KFX (from KFX Input) (1, 36, 0) && Annotations (1, 14, 0) && Find Duplicates (1, 8, 3) && KFX metadata reader (from KFX Input) (1, 36, 0) && KFX Input (1, 36, 0) && KePub Input (3, 4, 3) && KePub Metadata Reader (3, 4, 3) && KePub Output (3, 4, 3) && Kobo Books (1, 8, 0)
Traceback (most recent call last):
File "C:\Users\genoasalami\AppData\Roaming\calibre\plugins\annotations_resources\dialogs\cc_wizard.py", line 160, in dispatch_button_click
File "C:\Users\genoasalami\AppData\Roaming\calibre\plugins\annotations_resources\dialogs\cc_wizard.py", line 100, in custom_column_add
File "calibre\db\legacy.py", line 808, in create_custom_column
File "calibre\db\cache.py", line 72, in call_func_with_lock
File "calibre\db\cache.py", line 2014, in create_custom_column
File "calibre\db\backend.py", line 993, in create_custom_column
File "calibre\db\backend.py", line 920, in execute
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: custom_columns.label
|
That error says you already have a column with the lookup name "#myannotations". Or whatever name you used in the "Custom column wizard". The name you enter is used as the column header and is converted to lower case to be used as the lookup name. The error would only happen if you had used that name before.
A possibility is if you created the column, and didn't restart calibre. Then tried to do the configuration again (which is something I have done more times than I want to admit). At that point, I do not think the new column will not be in the list of suitable columns. But, if you tried to create it again, you would get this error.
I will look at putting some error handling in, but, in the meantime, check what calibre has in the the custom column list. The above should be there.