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

[youtube] Test video fails in python 3 #2695

Closed
jaimeMF opened this issue Apr 4, 2014 · 2 comments
Closed

[youtube] Test video fails in python 3 #2695

jaimeMF opened this issue Apr 4, 2014 · 2 comments
Labels
bug

Comments

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 4, 2014

Since a612753, the first test video fails:

$youtube-dl test:youtube
[debug] System config: []
[debug] User config: ['--keep-video', '--write-info-json', '--write-thumbnail', '--verbose']
[debug] Command-line args: ['test:youtube']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.04.01.2
[debug] Git HEAD: a612753
[debug] Python version 3.4.0 - Darwin-13.1.0-x86_64-i386-64bit
[debug] Proxy map: {}
[TestURL] Test URL: http://www.youtube.com/watch?v=BaW_jenozKc
[youtube] Setting language
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading video info webpage
[youtube] BaW_jenozKc: Extracting video information
Traceback (most recent call last):
  File "~/Developer/proyectos/youtube-dl/youtube-dl/y-dl", line 6, in <module>
    youtube_dl.main()
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/__init__.py", line 836, in main
    _real_main(argv)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/__init__.py", line 826, in _real_main
    retcode = ydl.download(all_urls)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/YoutubeDL.py", line 1025, in download
    self.extract_info(url)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/YoutubeDL.py", line 522, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/YoutubeDL.py", line 566, in process_ie_result
    extra_info=extra_info)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/YoutubeDL.py", line 511, in extract_info
    ie_result = ie.extract(url)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/extractor/common.py", line 161, in extract
    return self._real_extract(url)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/extractor/youtube.py", line 1192, in _real_extract
    json_code = uppercase_escape(mobj.group(1))
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/utils.py", line 1268, in uppercase_escape
    lambda m: m.group(0).decode('unicode-escape'), s)
  File "/usr/local/Cellar/python3/3.4.0/Frameworks/Python.framework/Versions/3.4/lib/python3.4/re.py", line 175, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "~/Developer/proyectos/youtube-dl/youtube-dl/youtube_dl/utils.py", line 1268, in <lambda>
    lambda m: m.group(0).decode('unicode-escape'), s)
AttributeError: 'str' object has no attribute 'decode'

But other test videos work.
Pinging @phihag.

@jaimeMF jaimeMF added the bug label Apr 4, 2014
@phihag
Copy link
Contributor

@phihag phihag commented Apr 4, 2014

Thank you very much for notifying me, I totally broke this. As usual, I blame missing tests. Fixed (and of course, added specific tests).

@jaimeMF
Copy link
Collaborator Author

@jaimeMF jaimeMF commented Apr 7, 2014

Thanks for looking into it.

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
2 participants
You can’t perform that action at this time.