Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-09-2010, 04: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
Old 06-09-2010, 04:34 PM   #2
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,301
Karma: 6022735
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Calibre 7.1 on Ubuntu Lucid 32bit
When I run "check DB integrity", I get a duplicate field message except mine has [edited] at the end
There is also a metadata.db.tmp file 330K(was 272K before I ran the check) and a metadata.db 330K in the library folder
?
theducks is offline   Reply With Quote
Old 06-09-2010, 04:57 PM   #3
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
I should have mentioned that I'm still running Win XP Pro.

I see the two folders in the library folder that you mentioned. Hadn't really noticed them before. The metadata.db was created back in May, and the metadata.tmp file was created when I first ran the db check today. Both were updated when I re-ran the db check.

I don't have an [edited] line at the end of the error message.
MSJim is offline   Reply With Quote
Old 09-07-2010, 11:21 AM   #4
chodsdon
Junior Member
chodsdon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Sony PRS 300
Same as first error message, first post.
chodsdon is offline   Reply With Quote
Old 09-07-2010, 12:07 PM   #5
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,925
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by chodsdon View Post
Same as first error message, first post.
What version of calibre are you running? On what OS?

Are you sure that the error is not more like:
------------------------
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 "#genre"
--------------------------
chaley is offline   Reply With Quote
Old 09-08-2010, 05:47 PM   #6
paolol
Junior Member
paolol began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Location: Milan - Italy
Device: BeBook Neo
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...
paolol is offline   Reply With Quote
Old 09-08-2010, 05:53 PM   #7
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,925
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by paolol View Post
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:
Welcome to the forum!

There are two errors being discussed in this post. The first was fixed some weeks ago (an old version being discussed). Yours was reported a few days ago (see this post), and has been fixed. The fix will be in the next release.
chaley is offline   Reply With Quote
Old 09-08-2010, 06:07 PM   #8
paolol
Junior Member
paolol began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Location: Milan - Italy
Device: BeBook Neo
Thanks a lot (sorry, I found only this thread and not the "right" one).
Great Job.

I'll wait for 0.7.18...
paolol is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a default value for a custom column? rangepig Calibre 2 10-11-2010 02:28 PM
Custom column read ? pchrist7 Calibre 2 10-04-2010 03:52 AM
create custom format column blaubach Calibre 12 09-17-2010 04:22 PM
custom column i need a little help shinken Calibre 3 09-15-2010 04:41 AM
custom column not searchable SkyDream Calibre 5 07-26-2010 06:38 AM


All times are GMT -4. The time now is 04:55 AM.


MobileRead.com is a privately owned, operated and funded community.