First of all: "hello!" (new member) and many thanks to Kovid and all the others who work on this project.
I think custom columns are very usefull, but I'm getting exactly the same error (0.7.17 on Windows XP): after adding a new custom column, running the check db integrity fails with:
ERROR: Error: Failed to check database integrity
Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\config\__init__.py", line 968, in run
File "site-packages\calibre\library\database2.py", line 2156, in check_integrity
File "site-packages\calibre\library\database2.py", line 209, in initialize_dynamic
File "site-packages\calibre\library\custom_columns.py", line 166, in __init__
File "site-packages\calibre\library\field_metadata.py", line 396, in add_custom_field
File "site-packages\calibre\library\field_metadata.py", line 491, in _add_search_terms_to_map
ValueError: Attempt to add duplicate search term "#anewcustomcolumn"
I started from a new db with 0.7.14 and everything worked fine (custom columns included), but as soon as I updated to .17 the db integrity started failing again.
Note that removing the customer columns solves the problem...