NotADirectoryError when merging books on MacOS

Bug #2037237 reported by Geordon VanTassle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Frequent, but not constant error of this type when merging duplicate entries on macOS 12.6.8 with Calibre 6.27.0 (and a couple of the most recent previous versions)

calibre 6.27 embedded-python: True
macOS-12.6.8-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '21.6.0', 'Darwin Kernel Version 21.6.0: Thu Jul 6 22:18:26 PDT 2023; root:xnu-8020.240.18.702.13~1/RELEASE_X86_64')
Python 3.10.1
OSX: ('12.6.8', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 5, 0) && Package KFX (from KFX Input) (2, 5, 0) && Amazon.com Multiple Countries (1, 0, 0) && Clean Comments (0, 2, 1) && Clean Metadata (0, 0, 6) && Comments Cleaner (1, 11, 1) && Copy Cover To Device (2, 0, 4) && Embed Comic Metadata (1, 6, 6) && Ex Libris (1, 0, 19) && Extract RIS Citations (1, 0, 15) && Fantastic Fiction (1, 6, 4) && Fantastic Fiction Adults (1, 3, 0) && Favourites Menu (1, 3, 0) && Find Duplicates (1, 10, 8) && Generate Cover (2, 3, 3) && Goodreads (1, 7, 9) && Goodreads Sync (1, 16, 3) && Job Spy (1, 0, 239) && KFX metadata reader (from KFX Input) (2, 5, 0) && KFX Input (2, 5, 0) && Set KFX metadata (from KFX Output) (2, 3, 1) && KFX Output (2, 3, 1) && Kindle Collections (1, 7, 29) && Kindle hi-res covers (0, 5, 0) && Library Codes (1, 0, 65) && Library Splitter (1, 0, 7) && LibraryThing Match (0, 2, 2) && Manage Series (1, 5, 1) && Modify ePub (1, 8, 1) && Open With (1, 8, 1) && Prettify Cover (1, 6, 0) && Quick Preferences (1, 7, 0) && Reformat plugin (2, 4, 0) && Resize Cover (1, 2, 0) && ScrambleEbook (0, 6, 0) && Search The Internet (1, 10, 1) && SmartEject (2, 5, 0) && Smashwords Metadata (1, 0, 2) && The Anarchist Library (1, 0, 0) && Unplugged (1, 0, 0) && X-Ray Creator (3, 2, 1) && Zotero Metadata Importer (1, 0, 78) && all recipes Recipe Reader (1, 0, 2)
Traceback (most recent call last):
  File "calibre/db/backend.py", line 416, in rmtree_with_retry
  File "shutil.py", line 717, in rmtree
  File "shutil.py", line 630, in _rmtree_safe_fd
  File "shutil.py", line 626, in _rmtree_safe_fd
NotADirectoryError: [Errno 20] Not a directory: '/Volumes/Calibre Library/Calibre Library/.caltrash/b/.DS_Store'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre/gui2/actions/edit_metadata.py", line 679, in merge_books
  File "calibre/gui2/actions/edit_metadata.py", line 732, in delete_books_after_merge
  File "calibre/gui2/library/models.py", line 465, in delete_books_by_id
  File "calibre/db/cache.py", line 85, in call_func_with_lock
  File "calibre/db/cache.py", line 2083, in remove_books
  File "calibre/db/backend.py", line 2168, in remove_books
  File "calibre/db/backend.py", line 2027, in ensure_trash_dir
  File "calibre/db/backend.py", line 2052, in expire_old_trash
  File "calibre/db/backend.py", line 422, in rmtree_with_retry
  File "shutil.py", line 717, in rmtree
  File "shutil.py", line 630, in _rmtree_safe_fd
  File "shutil.py", line 626, in _rmtree_safe_fd
NotADirectoryError: [Errno 20] Not a directory: '/Volumes/Calibre Library/Calibre Library/.caltrash/b/.DS_Store'

Tags: macos
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
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.