chbrown / overdrive

Bash script to download mp3s from the OverDrive audiobook service
449 stars 65 forks source link

newb I/O error : Operation not permitted warning: failed to load external entit #50

Closed drleahy closed 2 years ago

drleahy commented 2 years ago

Hi chbrown, I'm new to all this/terminal, just trying to get some audiobooks for commuting now that we are back to in-office work. I sure I'm screwing something up but when I run the command this is what is outputs in terminal. If you tell me how to send debug I can do that also: "user"@"users"-MacBook-Air Downloads % cd ~/Downloads ~/.local/bin/overdrive download "name of book"_9781984891747_4348059-2.odm Generating random ClientID=E16EACF5-156C-400A-8784-646E376A0B52 I/O error : Operation not permitted I/O error : Operation not permitted warning: failed to load external entity ""name of book"_9781984891747_4348059-2.odm"

I put " " around things I assume I don't want on here except the last line that does have ""

If I copy your command this is what it spits out, so I think??? I installed it correctly: "user"@"users"-MacBook-Air Downloads % cd ~/Downloads ~/.local/bin/overdrive download Novel.odm Specified media file does not exist: Novel.odm

again really sorry for what I assume is 100% user error because I'm old and this is new to me. thanks for any help.

chbrown commented 2 years ago

It's unfortunate that you redacted those parts — as far as I can tell that's exactly where things break down. I.e., you've obscured whatever might have shown me what you're doing wrong. Plus, using quotes (or not) in shell commands (what you're typing into the terminal here) can be significant (and sometimes necessary), but since you've inserted some of your own quotes, it's difficult to tell what actually had quotes and what did not.

I don't recall ever seeing that "I/O error : Operation not permitted" error myself, and I can't tell what's triggering that "warning: failed to load external entity" message. Neither of those are normal.

The best I can do is grab the same book and demonstrate exactly what steps I took to download it successfully.

First, I download it from my library website: screenshot of download in Chrome

Second, I verify that it's in my Downloads folder: screenshot of download in Finder

Finally, over in terminal, I run overdrive download like so:

[chbrown@air ~]$ cd ~/Downloads
[chbrown@air ~/Downloads]$ ~/.local/bin/overdrive download Wanderers_9781984891747_4348059.odm
Generating random ClientID=75D0DD37-1B25-4379-B874-595E4A01A903
Using AcquisitionUrl=https://ofs.contentreserve.com/MP3LicenseAcquisitionService.svc/2368f7cf-f82f-40f8-a785-f5e42c1d0520
Using MediaID=06ac8b66-2c96-4aaf-a707-68f357e0aeb9-123
Using RawHash=75D0DD37-1B25-4379-B874-595E4A01A903|1.2.0|10.11.6|ELOSNOC*AIDEM*EVIRDREVO
Using Hash=BLahBLAHblah
Using License=<License xmlns="http://license.overdrive.com/2008/03/License.xsd" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><SignedInfo><Version>1.0</Version><ContentID>06ac8b66-2c96-4aaf-a707-68f357e0aeb9-123</ContentID><ClientID>75D0DD37-1B25-4379-B874-595E4A01A903</ClientID></SignedInfo><Signature>QmxhaGJsYWhibGFoU29tZUxvbmdTaWduYXR1cmU=</Signature></License>
Using ClientID=75D0DD37-1B25-4379-B874-595E4A01A903 from License
Using Author=Chuck Wendig
Using Title=Wanderers
Creating directory Chuck Wendig - Wanderers
Downloading Chuck Wendig - Wanderers/Part01.mp3
Downloaded Chuck Wendig - Wanderers/Part01.mp3 successfully
Downloading Chuck Wendig - Wanderers/Part02.mp3
Downloaded Chuck Wendig - Wanderers/Part02.mp3 successfully
[...elided...]
Downloading Chuck Wendig - Wanderers/Part29.mp3
Downloaded Chuck Wendig - Wanderers/Part29.mp3 successfully
Downloading Chuck Wendig - Wanderers/Part30.mp3
Downloaded Chuck Wendig - Wanderers/Part30.mp3 successfully
Using CoverUrl=https://images.contentreserve.com/ImageType-100/1191-1/%7B4EDA293B-C597-468D-939E-E71140CB5768%7DImg100.jpg
Downloading Chuck Wendig - Wanderers/folder.jpg
Downloaded cover image successfully

Voila. Good luck.

drleahy commented 2 years ago

Hi Christopher,

Thank you for your reply, sorry in the delay in getting back to, weekend stuff with kiddos. I really appreciate the your help, if there is a way to tip or support your work lmk. So I tried again just now and am still seeing the i/o error. I am on Monterrey 12.6 if that is a problem…

Last login: Wed Sep 14 09:34:49 on ttys000

@.*** ~ % mkdir -p ~/.local/bin

curl https://chbrown.github.io/overdrive/overdrive.sh -o ~/.local/bin/overdrive

chmod +x ~/.local/bin/overdrive

% Total % Received % Xferd Average Speed Time Time Time Current

                             Dload  Upload   Total   Spent    Left  Speed

100 13443 100 13443 0 0 52650 0 --:--:-- --:--:-- --:--:-- 55094

@.*** ~ % cd ~/Downloads

~/.local/bin/overdrive download TheGoldenCompass_9781400085675_105282.odm

Generating random ClientID=5AA2E986-3962-4EB9-95DB-C2A14B862CD6

I/O error : Operation not permitted

I/O error : Operation not permitted

warning: failed to load external entity "TheGoldenCompass_9781400085675_105282.odm"

@.*** Downloads %

@.*** Downloads % $ cd ~/Downloads

and confirmed the odm is in user>Downloads @.***

I know this is not your paying job, so if this is out of line asking for help I totally understand.

Again thanks for the nice reply and. Hope you have a good week.

Josh

chbrown commented 2 years ago

Idk man. I happen to have a brand new fresh install of macOS 12.6 (same as yours) and went through the whole process as outlined in the README and it worked just fine

The only thing I can think is that you maybe didn't allow Terminal / iTerm2 to access your Downloads folder. Beyond that, 🤷‍♂️

P.S. thx but no tips/support, just a star (iff you get it working). I do it for the fame

drleahy commented 2 years ago

DUDE!!!! It was the access/permissions thing. TYSM, star coming your way!

chbrown commented 2 years ago

Great, thanks for the confirmation. Adding that to the 'Common errors' section.