chbrown / overdrive

Bash script to download mp3s from the OverDrive audiobook service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document is empty error

245am opened this issue · comments

commented

Thanks for putting together this script....
I have a couple of audio books checked out with .odm files on my computer. Every time I run overdrive download command I get this:

Generating random ClientID=AD447C67-5C73-4916-9F5E-92B680865419
Using AcquisitionUrl=https://ofs.contentreserve.com/MP3LicenseAcquisitionService.svc/158190f9-969d-4f8d-b8e3-ad8700b591a5
Using MediaID=e3cb0c48-c689-4515-9aeb-a6f0cf4bf425-425
Using RawHash=AD447C67-5C73-4916-9F5E-92B680865419|1.2.0|10.11.6|ELOSNOCAIDEMEVIRDREVO
Using Hash=1mwwKSyHYpTMxkPIccML3GJLIY0=
Using License=1.0e3cb0c48-c689-4515-9aeb-a6f0cf4bf425-425AD447C67-5C73-4916-9F5E-92B680865419UaD0d2lqOJos6mQiYUkn4LRSr+ilWRsnWoAN/NB98PTGDmcZbf2fEYZj9lO4s5dYkYzzH+h6HOXzBaaen9JNSwcl1fp4qwpnl3EPBaZ1GvSaOEPafpJnTO9Kd74P/lx92vNGzLvpn+ivS8j01kkcLRAFjuFhaSyaG73pcr1FLlM=
Using ClientID=AD447C67-5C73-4916-9F5E-92B680865419 from License
/home/user/.local/bin/overdrive: line 127: tidy: command not found
audiobookfilename.odm.metadata:1: parser error : Document is empty

(my user directory and odm file name changed for privacy but they are correct in the original output.

I have no idea how to interpret that... Any ideas?

This line

/home/user/.local/bin/overdrive: line 127: tidy: command not found

would tend to indicate that you are missing a required dependency, called Tidy. If you are running some flavor of Linux, try doing

which tidy

from the command line. If that doesn't give you any response, you may need to install tidy - how depends on your distro.

commented

Thanks for the tip! I think I've solved my issue (with your help)...

I noticed the line about tidy, but wasn't sure if it was what caused the "document is empty" error or not. As you pointed out, I needed to install Tidy, did that, and got a different error, a "LicenseError"... I tried returning the audiobook, deleting associated .odm and license files, and that did the trick!

I'm able to check out an audiobook, download the .odm file, and run this script to get all the mp3s. Perfect!

Thanks for the assist, @gtTracy :)

Yes, @245am, recovering from a partial failure like this isn't terribly easy, but that's how you do it. (#4 might help, but I haven't implemented that yet.) Glad you got it to work in the end!

tidy is probably the least common of the prerequisites, which is why there's #14, but as a more general improvement, I just made #34, which would clarify the severity and impact (like gtTracy's comment above) of the otherwise subtle "tidy: command not found" error message, and avoid getting into the partial failure state you found yourself in.