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

Get error on some pages #5824

Closed
Letux opened this issue May 26, 2015 · 2 comments
Closed

Get error on some pages #5824

Letux opened this issue May 26, 2015 · 2 comments

Comments

@Letux
Copy link

@Letux Letux commented May 26, 2015

HI. I use your script on my site. But sometime I get error like

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 405, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 395, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1486, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 649, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/pornhub.py", line 75, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/pornhub.py", line 75, in <lambda>
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbf in position 1: invalid start byte

May be we need convert page content to UTF string before use?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 26, 2015

Post the full output of youtube-dl when run with --verbose option.

@Letux
Copy link
Author

@Letux Letux commented May 26, 2015

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--dump-json', u'http://www.pornhub.com/view_video.php?viewkey=bed6bca62949b265009e', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.20
[debug] Python version 2.7.5 - Linux-3.10.0-229.el7.x86_64-x86_64-with-centos-7.1.1503-Core
[debug] exe versions: ffmpeg 0.6.5, ffprobe 0.6.5
[debug] Proxy map: {}
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 405, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 395, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1486, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 649, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/pornhub.py", line 75, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/pornhub.py", line 75, in <lambda>
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0: invalid start byte
@dstftw dstftw closed this in 7a372b6 May 26, 2015
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.