calibre 7.13 merge+delete does not work

Bug #2071458 reported by John Card II
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Just updated to calibre 7.13, Windows 11.

Added book with 3 different formats (pdf, mobi, epub) to existing library using automatic adding directory. Automerge turned off. Library has one custom attribute "date_read", which is a date.

Attempted to merge records by highlighting duplicates and pressing keyboard shortcut "M" which invokes "Edit metadata -> Merge Book Records M -> Merge into first selected book - delete others". (I turned off the confirmation for this merge action a long time ago.)

Merge did not work, got error, clipboard:
"calibre, version 7.13.0
ERROR: Unhandled exception: <b>TypeError</b>:cannot unpack non-iterable bool object

calibre 7.13 embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre.exe
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Baen (1, 1, 0) && Barnes & Noble (1, 5, 5) && EpubMerge (2, 18, 0) && EpubSplit (3, 7, 0) && Extract ISBN (1, 6, 3) && Find Duplicates (1, 10, 9) && Generate Cover (2, 3, 4) && Goodreads (1, 8, 2) && Kobo Books (1, 9, 2) && Manage Series (1, 5, 2) && Modify ePub (1, 8, 3) && Open With (1, 8, 3) && Quality Check (1, 13, 10) && Quick Preferences (1, 7, 1) && Reading List (1, 15, 4) && Resize Cover (1, 2, 1) && User Category (1, 6, 1)
Traceback (most recent call last):
  File "calibre\gui2\actions\edit_metadata.py", line 644, in merge_books
TypeError: cannot unpack non-iterable bool object
"

Removed book records, added books with "Add books -> Add books from a single folder A", saw correct duplicate message:

"✓ TheUniverseAbridged by Unknown [MOBI]
 Already in calibre:
 TheUniverseAbridged by Unknown [EPUB]

✓ TheUniverseAbridged by Unknown [PDF]
 Already in calibre:
 TheUniverseAbridged by Unknown [EPUB]
 "
Highlighted three records, right click to first merge option as above, identical error.

Then tried second merge option "Merge into first selected book - keep others Alt-M", worked as expected including confirmation dialog.

Tried third merge option "Merge only formats into first selected book - delete others Alt-Shift-M", worked as expected including confirmation dialog.
Repeated import+3rd merge, and turned off confirmation dialog, worked as expected.
Repeated third time, did not see confirmation dialog, worked as expected

Feature was working around 2 months ago in whatever then-current calibre was.

Confirmed same bug in other libraries with (more) custom fields.
Have not confirmed bug in "plain" library with no custom fields.

Revision history for this message
Kovid Goyal (kovid) wrote :

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

Changed in calibre:
status: New → Fix Released
Revision history for this message
Kovid Goyal (kovid) wrote :

Preview release with the fix is available at: https://download.calibre-ebook.com/preview/

Revision history for this message
James McIntosh (xjcryeyz) wrote : Re: [Bug 2071458] Re: calibre 7.13 merge+delete does not work
Download full text (3.4 KiB)

The merge function now works EXCEPT even if I uncheck the "Show this confirmation again" box, the alert shows up again regardless.

On Thursday, July 4th, 2024 at 11:29 PM, Kovid Goyal <email address hidden> wrote:

> Preview release with the fix is available at: https://download.calibre-
> ebook.com/preview/
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (2071735).
> https://bugs.launchpad.net/bugs/2071458
>
> Title:
> calibre 7.13 merge+delete does not work
>
> Status in calibre:
> Fix Released
>
> Bug description:
> Just updated to calibre 7.13, Windows 11.
>
> Added book with 3 different formats (pdf, mobi, epub) to existing
> library using automatic adding directory. Automerge turned off.
> Library has one custom attribute "date_read", which is a date.
>
> Attempted to merge records by highlighting duplicates and pressing
> keyboard shortcut "M" which invokes "Edit metadata -> Merge Book
>
> Records M -> Merge into first selected book - delete others". (I
>
> turned off the confirmation for this merge action a long time ago.)
>
> Merge did not work, got error, clipboard:
> "calibre, version 7.13.0
> ERROR: Unhandled exception: <b>TypeError</b>:cannot unpack non-iterable bool object
>
>
> calibre 7.13 embedded-python: True
> Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
> ('Windows', '10', '10.0.22631')
> Python 3.11.5
> Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
> Interface language: None
> EXE path: C:\Program Files\Calibre2\calibre.exe
> Successfully initialized third party plugins: DeDRM (7, 2, 1) && Baen (1, 1, 0) && Barnes & Noble (1, 5, 5) && EpubMerge (2, 18, 0) && EpubSplit (3, 7, 0) && Extract ISBN (1, 6, 3) && Find Duplicates (1, 10, 9) && Generate Cover (2, 3, 4) && Goodreads (1, 8, 2) && Kobo Books (1, 9, 2) && Manage Series (1, 5, 2) && Modify ePub (1, 8, 3) && Open With (1, 8, 3) && Quality Check (1, 13, 10) && Quick Preferences (1, 7, 1) && Reading List (1, 15, 4) && Resize Cover (1, 2, 1) && User Category (1, 6, 1)
> Traceback (most recent call last):
> File "calibre\gui2\actions\edit_metadata.py", line 644, in merge_books
> TypeError: cannot unpack non-iterable bool object
> "
>
> Removed book records, added books with "Add books -> Add books from a
>
> single folder A", saw correct duplicate message:
>
> "✓ TheUniverseAbridged by Unknown [MOBI]
> Already in calibre:
> TheUniverseAbridged by Unknown [EPUB]
>
>
> ✓ TheUniverseAbridged by Unknown [PDF]
> Already in calibre:
> TheUniverseAbridged by Unknown [EPUB]
> "
> Highlighted three records, right click to first merge option as above, identical error.
>
> Then tried second merge option "Merge into first selected book - keep
> others Alt-M", worked as expected including confirmation dialog.
>
> Tried third merge option "Merge only formats into first selected book - delete others Alt-Shift-M", worked as expected including confirmation dialog.
> Repeated import+3rd merge, and turned off confirmation dialog, worked as expected.
> Repeated third time, did not see confirmation dialog, worked as expected
>
> Feature was working around 2 months ago in whatever then-current
...

Read more...

Revision history for this message
Kovid Goyal (kovid) wrote :

Yeah, stupid typo. Will be fixed in next release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.