bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
668 stars 124 forks source link

Error when using --save-video/-audio option #134

Closed SigEpBlue closed 5 years ago

SigEpBlue commented 5 years ago

I'm getting the following error: tumblr_backup.py: error: --save-video/-audio: module 'youtube_dl' is not installed But in fact, I have had youtube-dl installed, and have been using it regularly, for years.

Is it possible the program is looking for 'youtube_dl' instead of 'youtube-dl'?

vlur commented 5 years ago

youtube_dl with the underscore is referring to a Python module:

-> % python2
Python 2.7.15 (default, Nov  3 2018, 19:49:34) 
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import youtube_dl
>>> youtube_dl
<module 'youtube_dl' from '/usr/lib/python2.7/site-packages/youtube_dl/__init__.pyc'>

It's also an "extra optional package" in the script which gets imported if available:

https://github.com/bbolli/tumblr-utils/blob/ac333b0b042d4bc0a91fbe89e21ea7e19d3dcc3a/tumblr_backup.py#L36-L45

If you're using the Python 3 version of tumblr-utils, you might need to install another different youtube-dl package; I just noticed that ytdl default version on my Void Linux box is the Python2 youtube-dl, but there is also a Python3 version available.

See #70 and specifically this post.

SigEpBlue commented 5 years ago

Oohkay, now I feel silly. Thank you so much for the details, @vlur ! I didn't realize there were different versions, but it makes sense now. I used pip, imported as the post to which you linked described, and I'm good now.

Thanks again! :)

vlur commented 5 years ago

Hey, no problem @SigEpBlue :) No need to feel silly. Glad it helped and glad you got it working!