View Single Post
Old 05-07-2010, 02:58 AM   #1
cbatalla
Junior Member
cbatalla began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2010
Device: Cybook 3Gen
Unhappy Error: malformed database schema (books_insert_trg)

Yesterday I updated to version 0.6.51 without problems. However, today when I enter Calibre I receive the error "Bad database location" with the following details:

Traceback (most recent call last):
File "site-packages\calibre\gui2\ui.py", line 517, in __init__
File "site-packages\calibre\library\database2.py", line 126, in __init__
File "site-packages\calibre\library\database2.py", line 129, in initialize_dynamic
File "site-packages\calibre\library\custom_columns.py", line 34, in __init__
File "site-packages\calibre\library\sqlite.py", line 163, in run
DatabaseException: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 127, in run
File "site-packages\calibre\library\sqlite.py", line 76, in get
DatabaseError: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists

I can point to an empty database I have on another directory, but if I go to preferences and re-select my old database the program says:

ERROR: Invalid database: <p>An invalid library already exists at f:\calibrelib, delete it before trying to move the existing library.<br>Error: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 127, in run
File "site-packages\calibre\library\sqlite.py", line 76, in get
DatabaseError: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists

Traceback (most recent call last):
File "site-packages\calibre\gui2\wizard\__init__.py", line 486, in move_library
File "site-packages\calibre\library\database2.py", line 126, in __init__
File "site-packages\calibre\library\database2.py", line 129, in initialize_dynamic
File "site-packages\calibre\library\custom_columns.py", line 34, in __init__
File "site-packages\calibre\library\sqlite.py", line 163, in run
DatabaseException: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 127, in run
File "site-packages\calibre\library\sqlite.py", line 76, in get
DatabaseError: malformed database schema (books_insert_trg) - trigger books_insert_trg already exists

As the database is not loaded, I cannot check its consistency from proferences.

Is there anything (from command line, for example) that I can do to try to fix my database. There are more than 5.000 books inside!

Thanks a lot.
cbatalla is offline   Reply With Quote