edit metadata individually>Download Metadata>press ok>unhandled exception

Bug #1221545 reported by Melanie Hotz on 2013-09-06
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

edit metadata individually>Download Metadata>press ok>unhandled exception

Edit the book again, the new data is stored. Pressing ok works. But download the metadata again gives the unhandled exception again.

I am not able to find out which data makes the trouble.

calibre, version 1.1.0
ERROR: Unhandled exception: <b>ConstraintError</b>:ConstraintError: column name is not unique

calibre 1.1 isfrozen: True is64bit: False
Windows-XP-5.1.2600-SP3 Windows ('32bit', 'WindowsPE')
('Windows', 'XP', '5.1.2600')
Python 2.7.4
Windows: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free')
Traceback (most recent call last):
  File "site-packages\calibre\gui2\metadata\single.py", line 496, in accept
  File "site-packages\calibre\gui2\metadata\single.py", line 469, in apply_changes
  File "site-packages\calibre\gui2\metadata\basic_widgets.py", line 1412, in commit
  File "site-packages\calibre\db\legacy.py", line 790, in func
  File "site-packages\calibre\db\cache.py", line 56, in ans
  File "site-packages\calibre\db\cache.py", line 939, in set_field
  File "site-packages\calibre\db\write.py", line 505, in set_books
  File "site-packages\calibre\db\write.py", line 289, in many_one
  File "site-packages\calibre\db\write.py", line 264, in change_case
  File "site-packages\calibre\db\backend.py", line 291, in executemany
  File "c:\cygwin\home\kovid\sw\build\apsw-3.7.17-r1\src\cursor.c", line 231, in resetcursor
ConstraintError: ConstraintError: column name is not unique

Post the metadata.db from your library and let me know which book it is
that you are getting the problem with.

 status incomplete

Changed in calibre:
status: New → Incomplete
Gurke (steffen-guergen) wrote :

error still exist in current Calibre

calibre, version 1.2.0
FEHLER: Nicht abgefangener Fehler: <b>ConstraintError</b>:ConstraintError: column name is not unique

calibre 1.2 isfrozen: True is64bit: True
Linux-3.8.0-29-generic-x86_64-with-debian-wheezy-sid Linux ('64bit', 'ELF')
('Linux', '3.8.0-29-generic', '#42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013')
Python 2.7.5
Linux: ('debian', 'wheezy/sid', '')
Traceback (most recent call last):
  File "site-packages/calibre/gui2/metadata/single.py", line 526, in next_clicked
  File "site-packages/calibre/gui2/metadata/single.py", line 469, in apply_changes
  File "site-packages/calibre/gui2/metadata/basic_widgets.py", line 1425, in commit
  File "site-packages/calibre/db/legacy.py", line 792, in func
  File "site-packages/calibre/db/cache.py", line 56, in ans
  File "site-packages/calibre/db/cache.py", line 939, in set_field
  File "site-packages/calibre/db/write.py", line 505, in set_books
  File "site-packages/calibre/db/write.py", line 289, in many_one
  File "site-packages/calibre/db/write.py", line 264, in change_case
  File "site-packages/calibre/db/backend.py", line 291, in executemany
  File "src/cursor.c", line 231, in resetcursor
ConstraintError: ConstraintError: column name is not unique

Kovid Goyal (kovid) wrote :

Again, post the metadata.db from your library and let me know which book it is
that you are getting the problem with.

Changed in calibre:
status: Incomplete → New
status: New → Incomplete
Gurke (steffen-guergen) wrote :

error appears while saving edited metadata from book " Philipp Vandenberg - Der Grüne Skarabäus "

Kovid Goyal (kovid) wrote :

That database has the same publisher Bastei Lubbe in both upper case and lower case, which is causing the problem. I will add a workaround to detect and handle this in the next release. In the meantime, if you simply change the publisher entry to Bastei Lubbe before clicking OK, you should be able to use the edit metadata dialog.

Gurke (steffen-guergen) wrote :

:thumbsup:

Gurke (steffen-guergen) wrote :

works fine now, thank you for your help

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments