Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find Metadata in ODM #76

Open
mjeshurun opened this issue Jul 20, 2024 · 10 comments
Open

Unable to find Metadata in ODM #76

mjeshurun opened this issue Jul 20, 2024 · 10 comments

Comments

@mjeshurun
Copy link

Hi friends,

I tried to download an audiobook using the python command, but I'm getting the "ValueError: Unable to find Metadata in ODM" error message.

`odmpy libby --latest 1
odmpy Interactive Client for Libby

Non-interactive mode. Downloading latest 1 loan...
Opening audiobook "Pimsleur Hebrew Level 1"...
Already downloaded odm file pimsleur-hebrew-level-1-390557.odm
An unexpected error has occurred
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/odmpy/odm.py", line 983, in run
process_odm(
File "/usr/local/lib/python3.9/site-packages/odmpy/processing/odm.py", line 135, in process_odm
raise ValueError("Unable to find Metadata in ODM")
ValueError: Unable to find Metadata in ODM
Traceback (most recent call last):
File "/usr/local/bin/odmpy", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/odmpy/main.py", line 27, in main
run()
File "/usr/local/lib/python3.9/site-packages/odmpy/odm.py", line 983, in run
process_odm(
File "/usr/local/lib/python3.9/site-packages/odmpy/processing/odm.py", line 135, in process_odm
raise ValueError("Unable to find Metadata in ODM")
ValueError: Unable to find Metadata in ODM`

Is there a known fix for this issue?

@wtanksleyjr
Copy link

Unfortunately no, there is not; we did attempt a fix but it broke, we have not been able to figure out any more.

There is a workaround documented in the comments to this bug (link goes directly to the comment in question): #69 (comment)

Notice that you will need to download the ODM file directly from your library's whatever.overdrive.com site (you can find that by using www.overdrive.com 's library finder).

@wtanksleyjr
Copy link

Another quick note: you don't need to use any of the options listed in that comment. I never use merging, but I normally use odmpy dl -k file.odm because I prefer to have the cover image separate; but you don't even need -k. If you want more metadata (like what series it belongs to) and you know the Libby ID, I can give you a command line to get that.

@mjeshurun
Copy link
Author

Many thanks for the explanations, @wtanksleyjr 🙏

@mjeshurun
Copy link
Author

mjeshurun commented Jul 21, 2024

Hi, @wtanksleyjr

I was able to follow your instructions and download an audiobook file :)

Do you know if there is a way to open odmpy created audiobooks with the apple Books app on iOS?

I used odmpy to create a .m4b file with chapters encoded in aac, but it seems the iOS Books app cannot import it.
I was able to open the file using the MacOS Books app, but not on iOS.

@wtanksleyjr
Copy link

Sorry, I know nothing about iOS. I'm not sure whether the Books app is supposed to handle audiobooks, though, is there still iTunes? I know that used to be the correct way.

Congrats on getting the rest to work though, I'm so glad the old ODM mode was left in.

@coloradoruss
Copy link

coloradoruss commented Jul 21, 2024 via email

@birlorg
Copy link

birlorg commented Jul 23, 2024

it it seems the iOS Books app cannot import it. I was able to open the file using the MacOS Books app, but not on iOS.

Import it into Books.app(literally drag and drop works) on MacOS and then sync the books to your phone, the phone will see them after a sync.

@mjeshurun
Copy link
Author

Thank for the tip, @birlorg .
Do you know if there's a way to sync the audiobook file to the iOS Books app using a Windows based PC?

@birlorg
Copy link

birlorg commented Jul 24, 2024

I don't really know. I think you have to use the Music app to play audiobooks if you are syncing from Windows, Install the Apple Devices app, and then just move it as a music file. https://support.apple.com/en-ph/guide/devices-windows/mchl5ded2763/windows

@mjeshurun
Copy link
Author

I don't really know. I think you have to use the Music app to play audiobooks if you are syncing from Windows, Install the Apple Devices app, and then just move it as a music file. https://support.apple.com/en-ph/guide/devices-windows/mchl5ded2763/windows

I will try. Thank you very much 🙏🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants