ssl error using urllib2

Bug #1694149 reported by Brian J. Murrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

On Ubuntu 14.04.5 LTS with python 2.7.5-5ubuntu3 and libpython2.7-stdlib 2.7.6-8ubuntu0.3, using this little example program:

#!/usr/bin/python

import urllib2

USER_AGENT = 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36'

defaultHeaders = {'User-Agent':USER_AGENT,
                 'Accept':"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                 'Accept-Encoding':'gzip,deflate,sdch',
                 'Accept-Language':'en-US,en;q=0.8'}

url = "https://ga.video.cdn.pbs.org/videos/ask-old-house/dcf0b26c-f7d1-4b1f-b1cf-2e521aa5e796/1000010577/hd-mezzanine-16x9/zq3zp3pg_ask1524-cove-16x9-hls-192-2500k.m3u8"
req = urllib2.Request(url.encode('utf-8'), None, defaultHeaders)

response = urllib2.urlopen(req, timeout=30)

I get this result:

$ python /tmp/urllib2-error.py
Traceback (most recent call last):
  File "/tmp/urllib2-error.py", line 15, in <module>
    response = urllib2.urlopen(req, timeout=30)
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure>

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

I wonder why this ticket has not even been triaged.

It was filed against an LTS release of Ubuntu.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

Hrm. What is the point of LTS even if bugs like this can go completely ignored?

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

Over a year later and no triage, no nothing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.