learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
457 stars 303 forks source link

Youtube DL no longer downloading from youtube #2777

Closed aronasorman closed 9 years ago

aronasorman commented 9 years ago

I get this error when I run videodownload.scrape_video manually:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/aron/src/ka-lite/kalite/updates/management/commands/videodownload.py", line 37, in scrape_video
    yt_dl.extract_info('www.youtube.com/watch?v=%s' % youtube_id, download=True)
  File "/home/aron/src/ka-lite/python-packages/youtube_dl/YoutubeDL.py", line 510, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/aron/src/ka-lite/python-packages/youtube_dl/YoutubeDL.py", line 539, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/home/aron/src/ka-lite/python-packages/youtube_dl/YoutubeDL.py", line 763, in process_video_result
    self.process_info(new_info)
  File "/home/aron/src/ka-lite/python-packages/youtube_dl/YoutubeDL.py", line 827, in process_info
    dn = os.path.dirname(encodeFilename(filename))
  File "/home/aron/src/ka-lite/python-packages/youtube_dl/utils.py", line 516, in encodeFilename
    assert type(s) == compat_str
AssertionError
aronasorman commented 9 years ago

youtube_dl might just need some updating, not sure what this will involve.

aronasorman commented 9 years ago

Turns out it's working. It just needs its arguments to be unicode. Still, I'll keep this open so I can submit a PR to update YoutubeDL.