![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4
Karma: 9768
Join Date: Dec 2013
Device: none
|
Trying to set a custom tag got error message in 2.2
In versions prior to 2.2, I was able to set a custom column tag via its drop down selection.
Now I get an error message: calibre, version 2.2.0 ERROR: Failed to set data: Could not set data, click Show Details to see why. Traceback (most recent call last): File "site-packages\calibre\gui2\library\models.py", line 1031, in setData File "site-packages\calibre\gui2\library\models.py", line 1057, in _set_data File "site-packages\calibre\gui2\library\models.py", line 1023, in set_custom_column_data File "site-packages\calibre\db\legacy.py", line 653, in set_custom File "site-packages\calibre\db\cache.py", line 1024, in set_field File "site-packages\calibre\db\write.py", line 513, in set_books File "site-packages\calibre\db\write.py", line 523, in set_books_for_enum File "site-packages\calibre\db\write.py", line 290, in many_one File "site-packages\calibre\db\write.py", line 246, in get_db_id File "site-packages\calibre\db\backend.py", line 793, in execute File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor ConstraintError: ConstraintError: UNIQUE constraint failed: custom_column_4.value Is there anything I need to do to, or is this a bug? Edited: This problem affects the last item only, which I rarely use, so I don't know how long the problem may have been there. Last edited by rd4407; 09-07-2014 at 05:25 PM. |
![]() |
![]() |
![]() |
#2 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The one you see is working for me. BR Last edited by BetterRed; 09-07-2014 at 04:49 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4
Karma: 9768
Join Date: Dec 2013
Device: none
|
Yes, a custom column, that I set up a long time ago.
Now, with 2.2., I can get as far as selecting the item from the drop down, but it doesn't take, giving me an error message instead. But, testing again, I noticed that it is the last item in the list that gives the error. Other values don't give the error. I rarely use the last item, so I really don't know how far back this problem may've gone. So I guess a temporary workaround is to put a dummy item at the end, to allow the real item to be used. Last edited by rd4407; 09-07-2014 at 05:18 PM. |
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The word 'tag' has many meanings in calibre - in the context of the Tag browser everything's a Tag, in the editor one of these <xxx> is a tag ![]() As you say, a value of 'zzzzzzzzzzzzzzz' will work around the problem. BR |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4
Karma: 9768
Join Date: Dec 2013
Device: none
|
Column type: Text, but with a fixed set of permitted values
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@rd4407
![]() The definitions and values are held in the database, maybe they've become 'corrupt' in some way. After backing-up the database library you could try doing a Library Maintenance->Restore Database. BR Last edited by BetterRed; 09-07-2014 at 07:30 PM. Reason: typo |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It would help if you attached the metadata.db file from your calibre library folder.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4
Karma: 9768
Join Date: Dec 2013
Device: none
|
Now, a couple of days later, I replaced the last "dummy" entry with a new real item, and selecting the last item worked.
|
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() Thanks for letting us know the problem is solved. BR Last edited by BetterRed; 09-10-2014 at 04:42 AM. Reason: fix errors as per chaley's following post |
|
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,445
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
For future reference, custom column definitions are in plain text in the "custom_columns" table. For columns with fixed values, the list of values is the "display" column along with some other stuff. The same information is in the "field_metadata" row in the preferences table and in metadata_db_prefs_backup.json.
|
![]() |
![]() |
![]() |
#11 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() BR Last edited by BetterRed; 09-10-2014 at 04:44 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
KindleGen error message: E1003 Unknown error in class String. | Doitsu | Kindle Formats | 1 | 06-25-2014 12:29 PM |
Assigning shortcut to custom tag? | khahoon | Library Management | 3 | 05-20-2013 06:11 PM |
Could not set data error message | thetimewarp | Calibre | 1 | 08-02-2012 09:15 PM |
TAG - A Techno Thriller set in the near future | simonroyle | Self-Promotions by Authors and Publishers | 160 | 06-15-2012 12:17 AM |
error message: ERROR ITMS-4099: "Invalid ISBN: [#] at Book (MZItmspBookPac | NewDay | ePub | 3 | 10-07-2010 01:47 PM |