Comment 0 for bug 1928321

Revision history for this message
ownedbycats (ownedbycats) wrote :

Calibre 5.17* (x64). Got error in both stable and run-from-source.

Attempting to merge two book records (Edit Metadata > Merge book records > Merge into first selected - delete others) gave me this error:

calibre, version 5.17.0
ERROR: Unhandled exception: <b>KeyError</b>:None

calibre 5.17 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Action Chains (1, 8, 8) && Audit Log (1, 0, 16) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 0, 0) && Comments Cleaner (1, 3, 2) && Count Pages (1, 11, 0) && Embed Comic Metadata (1, 6, 1) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 2, 0) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 5) && Generate Cover (2, 0, 2) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 4) && Job Spy (1, 0, 190) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 2) && Kobo Utilities (2, 13, 2) && KoboTouchExtended (3, 4, 4) && Library Codes (1, 0, 50) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 2) && Obok DeDRM (7, 2, 1) && Open With (1, 5, 13) && Overdrive Link (2, 45, 1) && Quality Check (1, 11, 2) && Reading List (1, 7, 6) && Search The Internet (1, 8, 1) && SmartEject (2, 3, 0) && Standard Ebooks (1, 0, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 0) && Walk Search History (1, 3, 2) && Overdrive Link* (2, 45, 1)
Traceback (most recent call last):
  File "calibre\gui2\actions\edit_metadata.py", line 634, in merge_books
  File "calibre\gui2\actions\edit_metadata.py", line 752, in merge_metadata
  File "calibre\db\legacy.py", line 703, in get_custom
  File "calibre\db\backend.py", line 957, in custom_field_name
KeyError: None

The book records were merged, but the second record didn't delete.

While creating an empty test library with the same structure to attach here, I also got this error. (Note that #readorder is a series-like column.) I can't open it in Calibre without getting a similar error, and the metadata.db it generated wasn't openable in SQLiteStudio.

calibre, version 5.17.0
ERROR: Unhandled exception: <b>ValueError</b>:Duplicate custom field [readorder_index]

calibre 5.17* [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Action Chains (1, 8, 8) && Audit Log (1, 0, 16) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 0, 0) && Comments Cleaner (1, 3, 2) && Count Pages (1, 11, 0) && Embed Comic Metadata (1, 6, 1) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 2, 0) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 5) && Generate Cover (2, 0, 2) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 4) && Job Spy (1, 0, 190) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 2) && Kobo Utilities (2, 13, 2) && KoboTouchExtended (3, 4, 4) && Library Codes (1, 0, 50) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 2) && Obok DeDRM (7, 2, 1) && Open With (1, 5, 13) && Overdrive Link (2, 45, 1) && Quality Check (1, 11, 2) && Reading List (1, 7, 6) && Search The Internet (1, 8, 1) && SmartEject (2, 3, 0) && Standard Ebooks (1, 0, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 0) && Walk Search History (1, 3, 2) && Overdrive Link* (2, 45, 1)
Traceback (most recent call last):
  File "D:\Documents\git\calibre\src\calibre\gui2\dialogs\choose_library.py", line 192, in accept
  File "D:\Documents\git\calibre\src\calibre\gui2\dialogs\choose_library.py", line 133, in perform_action
  File "D:\Documents\git\calibre\src\calibre\gui2\actions\choose_library.py", line 641, in choose_library_callback
  File "D:\Documents\git\calibre\src\calibre\gui2\ui.py", line 845, in library_moved
  File "D:\Documents\git\calibre\src\calibre\db\legacy.py", line 188, in __init__
  File "D:\Documents\git\calibre\src\calibre\db\legacy.py", line 45, in create_backend
  File "D:\Documents\git\calibre\src\calibre\db\backend.py", line 479, in __init__
  File "D:\Documents\git\calibre\src\calibre\db\backend.py", line 812, in initialize_custom_columns
  File "D:\Documents\git\calibre\src\calibre\library\field_metadata.py", line 561, in add_custom_field
ValueError: Duplicate custom field [readorder_index]

I ran Check Library and it said no errors.