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

ValueError: can't clear options before OpenSSL 0.9.8m #4294

Closed
Twangist opened this issue Nov 24, 2014 · 9 comments
Closed

ValueError: can't clear options before OpenSSL 0.9.8m #4294

Twangist opened this issue Nov 24, 2014 · 9 comments

Comments

@Twangist
Copy link

@Twangist Twangist commented Nov 24, 2014

I noticed this issue or one that had the same effect arose at or before 2013, and it was "closed" in I think 2013. However now I can't use youtube-dl whereas a few months ago I could.

When trying to DL a youtube video via

youtube-dl NA2X1040_gY

OS X 10.7.4, Python 3.4.2 . The above command gives:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/bin/youtube-dl/main.py", line 18, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 357, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 302, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 252, in init
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1406, in _setup_opener
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 408, in make_HTTPS_handler
ValueError: can't clear options before OpenSSL 0.9.8m

@Twangist
Copy link
Author

@Twangist Twangist commented Dec 11, 2014

PS -- For what it's worth, the problem also arises on a 10.5.6 machine, and it DOESN'T arise on a 10.6.8 machine (go figure)

@alundr
Copy link

@alundr alundr commented Dec 11, 2014

I have the same problem on OS X 10.9.9, Python 3.4.2.

This is my first attempt at installing youtube-dl. I installed by the command:

sudo pip3.4 install youtube-dl
Downloading/unpacking youtube-dl
Downloading youtube_dl-2014.12.10.3-py2.py3-none-any.whl (721kB): 721kB downloaded
Installing collected packages: youtube-dl
Successfully installed youtube-dl
Cleaning up...

Any call to youtube-dl, with or without a url parameter, results in:

youtube-dl
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/bin/youtube-dl", line 11, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/youtube_dl/init.py", line 355, in main
_real_main(argv)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/youtube_dl/init.py", line 301, in _real_main
with YoutubeDL(ydl_opts) as ydl:
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 252, in init
self._setup_opener()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1424, in _setup_opener
self.params.get('nocheckcertificate', False), debuglevel=debuglevel)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/youtube_dl/utils.py", line 414, in make_HTTPS_handler
context.options &= ~ssl.OP_NO_SSLv3 # Allow older, not-as-secure SSLv3
ValueError: can't clear options before OpenSSL 0.9.8m

@alundr
Copy link

@alundr alundr commented Dec 11, 2014

Correction, typo, OS X 10.9.5

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 11, 2014

How did you installe python: did you use the package from python.org or used a package manager like macports or homebrew?

@Twangist
Copy link
Author

@Twangist Twangist commented Dec 11, 2014

On the two machines where I get this error, I installed Python 3.4.2 from python.org.
On the one machine where youtube-dl works (OS X 10.6.8), I just used the system installation of 2.7.x.
All three are latest versions of youtube-dl.

For what it's worth, the --no-check-certificate and --prefer-insecure options don't make the error go away.

@alundr
Copy link

@alundr alundr commented Dec 12, 2014

From me same answer as from Twangist: I installed Python 3.4.2 from python.org.
Likewise I tried the two options with no change.

@phihag
Copy link
Contributor

@phihag phihag commented Dec 13, 2014

I believe this issue to be fixed in youtube-dl 2014.12.13.1 and newer. Since I don't own a Mac and it seems non-trivial to legally install OSX anywhere else, I'd very much appreciate feedback! See our FAQ if you need help updating.

@alundr
Copy link

@alundr alundr commented Dec 14, 2014

Yep, updated to youtube_dl-2014.12.14 and it works like a charm.
Thanx very much!

@Twangist
Copy link
Author

@Twangist Twangist commented Dec 18, 2014

I'll second that: updated to youtube_dl-2014.12.14 and it works like a charm for me too.
Thank you!

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