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

Error caused by KeyError('Ai',) #50

Open
LisanneG opened this issue Jan 12, 2017 · 2 comments
Open

Error caused by KeyError('Ai',) #50

LisanneG opened this issue Jan 12, 2017 · 2 comments

Comments

@LisanneG
Copy link

LisanneG commented Jan 12, 2017

I've been using this gem for a long time, really love it but recently i tried to download a youtube video but it gives me an error
Sample code i used:

require 'youtube-dl.rb'
options_mp3 = {
extract_audio: true,
audio_format: "mp3",
output: '%(title)s.%(ext)s'
}
YoutubeDL.download "https://www.youtube.com/watch?v=HoVWmW0Zdmo", options_mp3

Error i got:

D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/cocaine-0.5.8/lib/cocaine/command_line.rb:91:in `run': Command 'D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/youtube-dl.rb-0.3.1.2016.09.11.1/vendor/bin/youtube-dl --extract-audio --audio-format "mp3" --output "%(title)s.%(ext)s" --no-color --no-progress --print-json "https://www.youtube.com/watch?v=HoVWmW0Zdmo"' returned 1. Expected 0 (Cocaine::ExitStatusError)
Here is the command output: STDOUT:

STDERR:

ERROR: Signature extraction failed: Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\extractor\youtube.py", line 1005, in _decrypt_signature
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\extractor\youtube.py", line 932, in _extract_signature_function
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\extractor\youtube.py", line 984, in
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\jsinterp.py", line 254, in resf
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\jsinterp.py", line 55, in interpret_statement
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpj47q005f\build\youtube_dl\jsinterp.py", line 174, in interpret_expression
KeyError: 'Ai'
(caused by KeyError('Ai',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
from D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/youtube-dl.rb-0.3.1.2016.09.11.1/lib/youtube-dl/runner.rb:62:in run' from D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/youtube-dl.rb-0.3.1.2016.09.11.1/lib/youtube-dl/video.rb:39:in download'
from D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/youtube-dl.rb-0.3.1.2016.09.11.1/lib/youtube-dl/video.rb:15:in download' from D:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/youtube-dl.rb-0.3.1.2016.09.11.1/lib/youtube-dl.rb:25:in download'
from test.rb:20:in `

Really hope the error will be fixed or i'll get a solutions because this gem is the only one I loved working with.

@sapslaj
Copy link
Member

sapslaj commented Jan 22, 2017

Sorry for the late reply. My guess is it's probably just a really old youtube-dl version. I haven't had the time to update or work on this gem in several months and definitely not enough time to build something to automate updating the vendor youtube-dl. New Years Resolution: Start pushing out more updates.

In the meantime manually install youtube-dl. As long as the exe is in your PATH this gem should detect it and use it instead of the vendor youtube-dl.

@LisanneG
Copy link
Author

Thank you for the respond. I've been making my program in c# in the meantime which means i currently use the youtube-dl.exe. Either way I still really appreciate the gem, it has made my live easier for some months 👍

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

2 participants