Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
TypeError: __init__() keywords must be strings #6762
Comments
|
Another example ; |
Update python to some recent version. |
|
I already updated Python to Python 3.4, but youtube-dl still use the old 2.6 ; |
|
Post the output of |
|
root# python --version |
|
As you can see you did not update it. Recheck |
|
I use printenv to check PATH, his output ; tmp root# printenv Python 3.4 is first, but python --version and youtube-dl still use 2.6.1, I did not understand ! |
|
Maybe it's /System/Library/Frameworks/Python.framework/Versions/3.4/bin/:...? |
|
Yes, probably because I have a link from Current to 2.6 ; Does I must create a new link from Current to /Library/Frameworks/Python.framework/Versions/3.4 ? |
|
I have unlinked Current ; mon-ordi:Versions root# unlink Current but I didn't Know if Current was a file or was a directory and I don't know How to link to /Library/Frameworks/Python.framework/Versions/3.4 I never understand ln -s, can you help ? |
|
If you are installing the official Python from https://www.python.org/, there's no 'python' in
|
|
I have installed Python from https://www.python.org/ftp/python/3.4.3/python-3.4.3-macosx10.6.pkg On Terminal I haved ; mon-ordi:Versions root# cd /Library/Frameworks/Python.framework/Versions/3.4/bin/ I have tried your ln -s python3 python, then I have ; Then I have tried ; mon-ordi:Versions root# ln -s /Library/Frameworks/Python.framework/Versions/3.4/ ./Current |
|
I think you also need |
|
To avoid breaking my OS, I have read the documentation for Mac, here an extract ; 4.1. Getting and Installing MacPython What you get after installing is a number of things: A MacPython 3.4 folder in your Applications folder. In here you find IDLE, the development environment that is a standard part of official Python distributions; PythonLauncher, which handles double-clicking Python scripts from the Finder; and the “Build Applet” tool, which allows you to package Python scripts as standalone applications on your system. End of extract So the question is ; How to link youtube-dl to a non-system Python ? |
|
I think that as long as you only modify in /Library/Frameworks/Python.framework nothing in your system should break. If |
First, since 2 months ago approximately with Mac OS 10.6, I try to use youtube-dl with Python 3.4 ;
tmp root# PATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/usr/bin/
but youtube-dl continue to use my old Python 2.6
Second, since 2 months ago approximately I have compiled libav 11.4.
Until this day youtube-dl was working.
Third, youtube-dl is up to date ;
tmp root# youtube-dl --version2015.09.03
Since the update of today, youtube-dl does not work and I read this error ;
youtube-dl -f 18 --verbose https://www.youtube.com/watch?v=aMgaJgwQUoE
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-f', u'18', u'--verbose', u'https://www.youtube.com/watch?v=aMgaJgwQUoE']
[debug] Encodings: locale US-ASCII, fs utf-8, out US-ASCII, pref US-ASCII
[debug] youtube-dl version 2015.09.03
[debug] Python version 2.6.1 - Darwin-10.8.0-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4
[debug] Proxy map: {}
[youtube] aMgaJgwQUoE: Downloading webpage
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 121, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 410, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 400, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1653, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 655, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 992, in _real_extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 438, in _download_webpage
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 345, in _download_webpage_handle
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 326, in _request_webpage
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1860, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 754, in https_open
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1087, in do_open
h = http_class(host, timeout=req.timeout) # will parse host:port
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 595, in _create_http_connection
TypeError: init() keywords must be strings