View Single Post
Old 06-09-2010, 03:24 PM   #1
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
Custom Column Problem

I created a custom column in 7.1 and started getting errors when I check the database integrity. The problem goes away as soon as I remove the custom_column. Database intregity check works before the column is created.

Lookup name read
Column heading Read
Column type Yes/No

I've tried different column name/heading combinations, but the database integrity check always gives the same error.

ERROR: Error: Failed to check database integrity

Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\config\__init__.py", line 896, in run
File "site-packages\calibre\library\database2.py", line 1716, in check_integrity
File "site-packages\calibre\library\database2.py", line 156, in initialize_dynamic
File "site-packages\calibre\library\custom_columns.py", line 159, in __init__
File "site-packages\calibre\library\field_metadata.py", line 370, in add_custom_field
ValueError: Duplicate custom field [read]

I ran calibredb custom_columns -d to check the field names and there is only one listed - no duplicate.

When the field is freshly created, and I have not tried to check the database integrity, I am able to modify the column contents i.e. change the value from Yes to No etc., but after I generate the duplicate field error, I can't change the field value. The following error appears. Restarting Calibre clears this error until I try to check database integrity and get the error message above.

ERROR: ERROR: Unhandled exception: <b>DatabaseException</b>:no such table: meta2
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 148, in run
File "site-packages\calibre\library\sqlite.py", line 88, in get
OperationalError: no such table: meta2

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\delegates.py", line 295, in setModelData
File "site-packages\calibre\gui2\library\models.py", line 692, in setData
File "site-packages\calibre\gui2\library\models.py", line 684, in set_custom_column_data
File "site-packages\calibre\library\custom_columns.py", line 324, in set_custom
File "site-packages\calibre\library\sqlite.py", line 184, in run
DatabaseException: no such table: meta2
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 148, in run
File "site-packages\calibre\library\sqlite.py", line 88, in get
OperationalError: no such table: meta2
MSJim is offline   Reply With Quote