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

Invalid URL: UnicodeEncodeError #1435

Closed
scottt opened this issue Sep 16, 2013 · 5 comments
Closed

Invalid URL: UnicodeEncodeError #1435

scottt opened this issue Sep 16, 2013 · 5 comments

Comments

@scottt
Copy link

@scottt scottt commented Sep 16, 2013

[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.bloomberg.com/video/shah-s-presentation-on-foreign-exchange-strategies-qurhIVlJSB6hzkVi229d8g.html']
[debug] youtube-dl version 2013.09.16
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 "/home/scottt/bin/youtube-dl/main.py", line 18, in
File "/home/scottt/bin/youtube-dl/youtube_dl/init.py", line 670, in main
File "/home/scottt/bin/youtube-dl/youtube_dl/init.py", line 629, in _real_main
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 87: ordinal not in range(128)

@phihag
Copy link
Contributor

@phihag phihag commented Sep 16, 2013

Thanks for the report. This should only happen in --verbose mode and is curious, since I was sure we had that problem fixed in #1228. On which platform are you running this? Is it Fedora 19?

@scottt
Copy link
Author

@scottt scottt commented Sep 16, 2013

I'm indeed on Fedora 19 with an "en_US.utf8" locale.

@phihag
Copy link
Contributor

@phihag phihag commented Sep 16, 2013

Strange, it works fine on my fedora box (with en_US.utf8 as well). Can you post the output of env?

@scottt
Copy link
Author

@scottt scottt commented Sep 16, 2013

XDG_VTNR=1
TPD_GLOBAL=/usr/share/toped/
XDG_SESSION_ID=1
HOSTNAME=sd.scottt
IMSETTINGS_INTEGRATE_DESKTOP=yes
GPG_AGENT_INFO=/run/user/500/keyring-WWfbZU/gpg:0:1
TERM=xterm-256color
VTE_VERSION=3406
XDG_MENU_PREFIX=gnome-
SHELL=/bin/bash
HISTSIZE=50000
WINDOWID=40020198
QTDIR=/usr/lib64/qt-3.3
GNOME_KEYRING_CONTROL=/run/user/500/keyring-WWfbZU
QTINC=/usr/lib64/qt-3.3/include
IMSETTINGS_MODULE=none
QT_GRAPHICSSYSTEM_CHECKED=1
TPD_LOCAL=/home/scottt
USER=scottt
LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:.tar=38;5;9:.tgz=38;5;9:.arc=38;5;9:.arj=38;5;9:.taz=38;5;9:.lha=38;5;9:.lzh=38;5;9:.lzma=38;5;9:.tlz=38;5;9:.txz=38;5;9:.tzo=38;5;9:.t7z=38;5;9:.zip=38;5;9:.z=38;5;9:.Z=38;5;9:.dz=38;5;9:.gz=38;5;9:.lrz=38;5;9:.lz=38;5;9:.lzo=38;5;9:.xz=38;5;9:.bz2=38;5;9:.bz=38;5;9:.tbz=38;5;9:.tbz2=38;5;9:.tz=38;5;9:.deb=38;5;9:.rpm=38;5;9:.jar=38;5;9:.war=38;5;9:.ear=38;5;9:.sar=38;5;9:.rar=38;5;9:.alz=38;5;9:.ace=38;5;9:.zoo=38;5;9:.cpio=38;5;9:.7z=38;5;9:.rz=38;5;9:.cab=38;5;9:.jpg=38;5;13:.jpeg=38;5;13:.gif=38;5;13:.bmp=38;5;13:.pbm=38;5;13:.pgm=38;5;13:.ppm=38;5;13:.tga=38;5;13:.xbm=38;5;13:.xpm=38;5;13:.tif=38;5;13:.tiff=38;5;13:.png=38;5;13:.svg=38;5;13:.svgz=38;5;13:.mng=38;5;13:.pcx=38;5;13:.mov=38;5;13:.mpg=38;5;13:.mpeg=38;5;13:.m2v=38;5;13:.mkv=38;5;13:.ogm=38;5;13:.mp4=38;5;13:.m4v=38;5;13:.mp4v=38;5;13:.vob=38;5;13:.qt=38;5;13:.nuv=38;5;13:.wmv=38;5;13:.asf=38;5;13:.rm=38;5;13:.rmvb=38;5;13:.flc=38;5;13:.avi=38;5;13:.fli=38;5;13:.flv=38;5;13:.gl=38;5;13:.dl=38;5;13:.xcf=38;5;13:.xwd=38;5;13:.yuv=38;5;13:.cgm=38;5;13:.emf=38;5;13:.axv=38;5;13:.anx=38;5;13:.ogv=38;5;13:.ogx=38;5;13:.aac=38;5;45:.au=38;5;45:.flac=38;5;45:.mid=38;5;45:.midi=38;5;45:.mka=38;5;45:.mp3=38;5;45:.mpc=38;5;45:.ogg=38;5;45:.ra=38;5;45:.wav=38;5;45:.axa=38;5;45:.oga=38;5;45:.spx=38;5;45:_.xspf=38;5;45:
SSH_AUTH_SOCK=/run/user/500/keyring-WWfbZU/ssh
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1159,unix/unix:/tmp/.ICE-unix/1159
GNOME_DISABLE_CRASH_DIALOG=1
USERNAME=scottt
PAGER=/home/scottt/bin/vim-pager
TORTOISEHG_PATH=/home/scottt/work/tortoisehg/stable
MANSECT=0p:3p:1:1p:3:2:4:5:6:7:8:9:l#:n
DESKTOP_SESSION=gnome
MAIL=/var/spool/mail/scottt
PATH=/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/libexec/sdcc:/home/scottt/bin:/usr/libexec/sdcc
KDE_DEBUG=1
QT_IM_MODULE=ibus
INPUTRC=/home/scottt/.inputrc
PWD=/home/scottt
XMODIFIERS=@im=ibus
EDITOR=vim
LANG=en_US.utf8
KDE_IS_PRELINKED=1
GNOME_KEYRING_PID=1157
GDM_LANG=en_US.utf8
MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
LOADEDMODULES=
KDEDIRS=/usr
GDMSESSION=gnome
HISTCONTROL=ignoreboth
MANPAGER=bash -c "vim -MRn -c "set ft=man nomod nolist nospell nonu" -c "nm q :qa!" -c "nm G" -c "nm gg"</dev/tty <(col -b)"
SHLVL=2
PERF_PAGER=most
HOME=/home/scottt
XDG_SEAT=seat0
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=scottt
CVS_RSH=ssh
QTLIB=/usr/lib64/qt-3.3/lib
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-DH0nQiMMgR,guid=1a37a4ead9d22f500e41c216523473cf
MODULESHOME=/usr/share/Modules
LESSOPEN=||/usr/bin/lesspipe.sh %s
WINDOWPATH=1
XDG_RUNTIME_DIR=/run/user/500
DISPLAY=:0
QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins
PANGO_LANGUAGE=zh_TW
VDPAU_DRIVER=va_gl
XAUTHORITY=/run/gdm/auth-for-scottt-eyWrCx/database
COLORTERM=gnome-terminal
CCACHE_HASHDIR=
module=() { eval /usr/bin/modulecmd bash $_
}
_=/usr/bin/env

@scottt
Copy link
Author

@scottt scottt commented Sep 16, 2013

@phihag, this only happens when redirecting STDERR to a file. I have a proof of concept patch (only tested on Python 2) here: scottt/youtube-dl@ba6e565

Of course, what I really wanted was to download that video on foreign exchange trading from bloomberg.com :)

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.