Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-23-2021, 10:36 AM   #1
jtxr
Junior Member
jtxr began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2021
Device: kindle
Error Adding Books

Hello everyone,

I have installed Calibre and am trying to add many .epub files.
99% of them gave me an error message, please see example below.

The metadata.db file is in place and my Mac user have read and right access to it... I am not an expert user, so I humbly ask for help in case someone knows what might be wrong.

Thank you very much




Failed to add the file /Users/julianoteixeira/Desktop/books/The God of Small Things.epub to the book: /Users/julianoteixeira/Desktop/books/The God of Small Things
With error:
Traceback (most recent call last):
File "calibre/gui2/add.py", line 488, in add_formats
File "calibre/db/cache.py", line 1526, in add_format
IsADirectoryError: [Errno 21] Is a directory: '/Users/julianoteixeira/Desktop/books/The God of Small Things.epub'
jtxr is offline   Reply With Quote
Old 01-23-2021, 10:57 AM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,946
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Although it looks like an ePub (which is a single zip file), it's actually a folder that's had a 'package' bit set so that it looks like a file in the Mac OS X Finder.

This probably means they're from Apple iBooks.

You can convert them to proper zipped ePubs using my handy AppleScript. Just download from https://www.mobileread.com/forums/sh...ad.php?t=55681

Once they are actually zip files, you'll be able to import them to calobre. Although if they are from iBooks, they'll probably have DRM making them storable but not readable in calibre.
pdurrant is offline   Reply With Quote
Advert
Old 01-23-2021, 01:21 PM   #3
jtxr
Junior Member
jtxr began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2021
Device: kindle
Ok! Just one question...

Thank you so much for helping.

I am not familiar with scripts (yes, I am a very basic Mac user LOL)... I can't seem to know how to run the script properly. I just clicked on it, but nothing happened... How to I actually use it to zip the files, please?

I am really sorry if I am asking something stupid.

Thanks again
jtxr is offline   Reply With Quote
Old 01-23-2021, 01:43 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Please do not store your Library on the DESKTOP.
Way 2 easy to delete. If you want it to appear, add a shortcut (but really, you should avoid using the OS for anything within, too easy to change cause the DB to lose track of books)
theducks is offline   Reply With Quote
Old 01-23-2021, 03:01 PM   #5
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,946
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by jtxr View Post
Thank you so much for helping.

I am not familiar with scripts (yes, I am a very basic Mac user LOL)... I can't seem to know how to run the script properly. I just clicked on it, but nothing happened... How to I actually use it to zip the files, please?

I am really sorry if I am asking something stupid.

Thanks again
Once downloaded, right-click and select Open. You'll be asked for permission, if your sure. Yes, you want to give it the permissions requested.

Once it's running, quit.

Drag & drop one of the 'epub's onto the AppleScript icon. It will launch, probably ask for more permissions, and then do the job of creating a proper epub.

I beleive you can drag & drop several items at once, once it's working OK.
pdurrant is offline   Reply With Quote
Advert
Old 01-25-2021, 03:03 PM   #6
jtxr
Junior Member
jtxr began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2021
Device: kindle
Thanks for explaining how the Apple Script works.

So, I have done everything as you told me and got this error message after telling the script to replace the original epub file:


sh: line 0: cd: /Users/julianoteixeira/Desktop/1065574604.epub/: No such file or directory


Any ideas of what might be wrong?

Many thanks.
jtxr is offline   Reply With Quote
Old 01-25-2021, 04:06 PM   #7
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,946
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by jtxr View Post
Thanks for explaining how the Apple Script works.

So, I have done everything as you told me and got this error message after telling the script to replace the original epub file:


sh: line 0: cd: /Users/julianoteixeira/Desktop/1065574604.epub/: No such file or directory


Any ideas of what might be wrong?

Many thanks.

Not at the moment. But try setting it not to replace the original epub.
pdurrant is offline   Reply With Quote
Old 01-25-2021, 05:46 PM   #8
jtxr
Junior Member
jtxr began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2021
Device: kindle
unfortunately it looks like there is no way of changing that setting...
jtxr is offline   Reply With Quote
Old 11-15-2021, 11:13 PM   #9
millpondflora
Junior Member
millpondflora began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2021
Device: iPad
Hello. I'm experiencing similar errors to what jtxr described above. I have a number of DRM-free ebooks in Apple Books. I want to get them into calibre. So I drag them to my desktop, where they look like perfectly fine epub files. But when I try to import them to calibre, I get an error message:

----------------------------------------------------------------------
Failed to add the file /Users/XYZ/Desktop/Wit.epub to the book: /Users/XYZ/Desktop/Wit
With error:
Traceback (most recent call last):
File "calibre/gui2/add.py", line 488, in add_formats
File "calibre/db/cache.py", line 1573, in add_format
IsADirectoryError: [Errno 21] Is a directory: '/Users/XYZ/Desktop/Wit.epub'
----------------------------------------------------------------------

So I downloaded pdurrant's handy "ePub Zip-Unzip 64 3.0" applescript, dragged the epub file onto it, but then get this error message:

----------------------------------------------------------------------
"sh: line 0: cd: /Users/XYZ/Desktop/Wit.epub/: No such file or directory"
----------------------------------------------------------------------

pdurrant, I see your suggestion to try setting it not to replace the original epub. But I'm not sure how to do this. If I press "cancel" when the "Do you want to replace it?" screen comes up, the app just quits. Would I need to adjust the underlying applescript in order to change this setting? If so, do you have tips on what edits to make?

No worries if you don't have time to offer support. It's not the end of the world if I can't solve this problem. Thanks in any case.
millpondflora is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error adding books spynumber Library Management 6 02-21-2017 07:59 PM
DLL error when adding books HRR Calibre 9 10-15-2015 05:30 AM
Adding books Error tdwish Conversion 4 01-22-2012 06:37 AM
error adding books Beau Calibre 5 11-02-2010 12:03 PM
Error adding books Gfinch Calibre 2 08-03-2008 08:36 PM


All times are GMT -4. The time now is 07:04 PM.


MobileRead.com is a privately owned, operated and funded community.