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

Downloading js player not working in 2014.07.23.1 #3326

Closed
DabKick opened this issue Jul 22, 2014 · 13 comments
Closed

Downloading js player not working in 2014.07.23.1 #3326

DabKick opened this issue Jul 22, 2014 · 13 comments

Comments

@DabKick
Copy link

@DabKick DabKick commented Jul 22, 2014

/usr/local/bin/youtube-dl -f 18 --youtube-print-sig-code --skip-download 6g6g2mvItp4
[youtube] Setting language
[youtube] 6g6g2mvItp4: Downloading webpage
[youtube] 6g6g2mvItp4: Downloading video info webpage
[youtube] 6g6g2mvItp4: Extracting video information
[youtube] 6g6g2mvItp4: Encrypted signatures detected.
[youtube] 6g6g2mvItp4: Downloading js player vflBb0OQx
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 857, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 847, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1052, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 531, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 405, in report_error
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 358, in trouble
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 306, in to_stderr
AssertionError

@phihag
Copy link
Contributor

@phihag phihag commented Jul 23, 2014

Can you post the output you get when you add -v to your command?

@DabKick
Copy link
Author

@DabKick DabKick commented Jul 23, 2014

ip-10-110-162-99:/usr/local/bin # /usr/local/bin/youtube-dl -v -f 18 --youtube-print-sig-code --skip-download fwK7ggA3-bU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-f', '18', '--youtube-print-sig-code', '--skip-download', 'fwK7ggA3-bU']
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 857, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 812, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1243, in print_debug_header
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1011, in write_string
AssertionError

@DabKick
Copy link
Author

@DabKick DabKick commented Jul 23, 2014

To narrow down the issue, I just ran the command with -v to download the video and got the same errors. Here's the output:

ip-10-110-162-99:/usr/local/bin # ./youtube-dl fwK7ggA3-bU
[youtube] Setting language
[youtube] fwK7ggA3-bU: Downloading webpage
[youtube] fwK7ggA3-bU: Downloading video info webpage
[youtube] fwK7ggA3-bU: Extracting video information
[youtube] fwK7ggA3-bU: Encrypted signatures detected.
[youtube] fwK7ggA3-bU: Downloading js player vflBb0OQx
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "./youtube-dl/main.py", line 18, in
File "./youtube-dl/youtube_dl/init.py", line 857, in main
File "./youtube-dl/youtube_dl/init.py", line 847, in _real_main
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1052, in download
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 531, in extract_info
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 405, in report_error
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 358, in trouble
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 306, in to_stderr
AssertionError

ip-10-110-162-99:/usr/local/bin # ./youtube-dl -v fwK7ggA3-bU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'fwK7ggA3-bU']
Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "./youtube-dl/main.py", line 18, in
File "./youtube-dl/youtube_dl/init.py", line 857, in main
File "./youtube-dl/youtube_dl/init.py", line 812, in _real_main
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1243, in print_debug_header
File "./youtube-dl/youtube_dl/utils.py", line 1011, in write_string
AssertionError

@phihag phihag closed this in c081b35 Jul 23, 2014
phihag added a commit that referenced this issue Jul 23, 2014
Fixes #3326
Apparently, on some platforms, even outputting this fails already.
@phihag
Copy link
Contributor

@phihag phihag commented Jul 23, 2014

Thanks for the feedback. Can you post the output you get (with and without -v) with youtube-dl 2014.07.23.2? (Type sudo youtube-dl -U to update)

@phihag
Copy link
Contributor

@phihag phihag commented Jul 23, 2014

Reopening, it is unlikely that the changes have fixed the output configuration error we're seeing here.

@phihag phihag reopened this Jul 23, 2014
@DabKick
Copy link
Author

@DabKick DabKick commented Jul 23, 2014

Thanks. I updated it but getting different errors now. Here's the output:

ip-10-110-162-99:/usr/local/bin # /usr/local/bin/youtube-dl -v -f 18 --youtube-print-sig-code --skip-download fwK7ggA3-bU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-f', '18', '--youtube-print-sig-code', '--skip-download', 'fwK7ggA3-bU']
Failed to write encoding string '[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n'Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 857, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 812, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1251, in print_debug_header
IOError: Failed to write encoding string '[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n'
ip-10-110-162-99:/usr/local/bin # /usr/local/bin/youtube-dl -f 18 --youtube-print-sig-code --skip-download -v fwK7ggA3-bU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', '18', '--youtube-print-sig-code', '--skip-download', '-v', 'fwK7ggA3-bU']
Failed to write encoding string '[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n'Traceback (most recent call last):
File "/usr/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 857, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 812, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1251, in print_debug_header
IOError: Failed to write encoding string '[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n'
ip-10-110-162-99:/usr/local/bin #

@phihag
Copy link
Contributor

@phihag phihag commented Jul 23, 2014

Note that you use -v in both outputs. What version of python are you using (python --version)? Can you tell me your operating system / Linux distrbution?

@DabKick
Copy link
Author

@DabKick DabKick commented Jul 23, 2014

ip-10-110-162-99:/usr/local/bin # python --version
Python 2.6

ip-10-110-162-99:/usr/local/bin # uname -a
Linux ip-10-110-162-99 2.6.32.19-0.3-ec2 #1 SMP 2010-09-17 20:28:21 +0200 i686 i686 i386 GNU/Linux

ip-10-110-162-99:/usr/local/bin # cat /etc/*-release
SUSE Linux Enterprise Server 11 (i586)
VERSION = 11
PATCHLEVEL = 1

@l3uddz
Copy link

@l3uddz l3uddz commented Jul 23, 2014

This is also happening with the standalone .exe provided at http://rg3.github.io/youtube-dl/
was working fine yesterday, can only assume they have made some changes 👎

UPDATE: Was using 3 day old bin, ignroe this post =) havent encountered the error since updating to .23

@DabKick
Copy link
Author

@DabKick DabKick commented Jul 24, 2014

Automatic signature extraction failed with the latest version. Here's the output:

domU-12-31-39-09-14-01:/usr/local/bin # ./youtube-dl -v McEoTIqoRKk
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'McEoTIqoRKk']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.07.23.2
[debug] Python version 2.6.8 - Linux-2.6.32.19-0.3-ec2-i686-with-SuSE-11-i586
[debug] Proxy map: {}
[youtube] Setting language
[youtube] McEoTIqoRKk: Downloading webpage
[youtube] McEoTIqoRKk: Downloading video info webpage
[youtube] McEoTIqoRKk: Extracting video information
[youtube] McEoTIqoRKk: Encrypted signatures detected.
[youtube] encrypted signature length 83 (55.27), itag 22, html5 player en_US-vfl9FYC6l
[youtube] McEoTIqoRKk: Downloading js player vfl9FYC6l
WARNING: Writing cache to u'/root/.cache/youtube-dl/youtube-sigfuncs/js_vfl9FYC6l_83.json' failed: Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 392, in _extract_signature_function
cache_res = res(test_string)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 450, in
return lambda s: initial_function([s])
File "./youtube-dl/youtube_dl/jsinterp.py", line 148, in resf
res = self.interpret_statement(stmt, local_vars)
File "./youtube-dl/youtube_dl/jsinterp.py", line 44, in interpret_statement
'Cannot determine left side of statement in %r' % stmt)
ExtractorError: Cannot determine left side of statement in u'jo.Dv(a,28)'; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.

ERROR: Automatic signature extraction failed: Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 477, in _decrypt_signature
return func(s)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 450, in
return lambda s: initial_function([s])
File "./youtube-dl/youtube_dl/jsinterp.py", line 148, in resf
res = self.interpret_statement(stmt, local_vars)
File "./youtube-dl/youtube_dl/jsinterp.py", line 44, in interpret_statement
'Cannot determine left side of statement in %r' % stmt)
ExtractorError: Cannot determine left side of statement in u'jo.Dv(a,28)'; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 477, in _decrypt_signature
return func(s)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 450, in
return lambda s: initial_function([s])
File "./youtube-dl/youtube_dl/jsinterp.py", line 148, in resf
res = self.interpret_statement(stmt, local_vars)
File "./youtube-dl/youtube_dl/jsinterp.py", line 44, in interpret_statement
'Cannot determine left side of statement in %r' % stmt)
ExtractorError: Cannot determine left side of statement in u'jo.Dv(a,28)'; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 516, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 169, in extract
return self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 847, in _real_extract
encrypted_sig, video_id, player_url, age_gate)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 481, in _decrypt_signature
u'Automatic signature extraction failed: ' + tb, cause=e)
ExtractorError: Automatic signature extraction failed: Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 477, in _decrypt_signature
return func(s)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 450, in
return lambda s: initial_function([s])
File "./youtube-dl/youtube_dl/jsinterp.py", line 148, in resf
res = self.interpret_statement(stmt, local_vars)
File "./youtube-dl/youtube_dl/jsinterp.py", line 44, in interpret_statement
'Cannot determine left side of statement in %r' % stmt)
ExtractorError: Cannot determine left side of statement in u'jo.Dv(a,28)'; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type youtube-dl -U to update.

@phihag
Copy link
Contributor

@phihag phihag commented Jul 24, 2014

@DabKick That's unrelated to your problem with -v and should be fixed as of 2014.07.24.

@phihag
Copy link
Contributor

@phihag phihag commented Jul 24, 2014

I can reproduce the error with SLES 11 SP1, but not SLES 11 SP3.

@phihag
Copy link
Contributor

@phihag phihag commented Jul 24, 2014

In the Python in SLES 11 SP1, the following does not hold in a zipfile:

from __future__ import unicode_literals
assert type('') is unicode

I'm afraid we can not support such outdated versions. It's a surprise that only -v is broken under these conditions. You can update to SLES11 SP3 where this is fixed, or install a newer Python interpreter.

@phihag phihag closed this Jul 24, 2014
phihag added a commit that referenced this issue Jul 24, 2014
The only time that write_string should fail is if the Python is completely braindead.
Check for that condition and output a more accurate warning.

See #3326 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.