Open Bug 1329406 Opened 3 years ago Updated 3 years ago

mozregression fails to run (AttributeError: 'Extensions' object has no attribute 'get_extension_for_class')


(Testing :: mozregression, defect)

Not set


(Not tracked)



(Reporter: JanH, Unassigned)


Running on Windows 7 with latest ActiveState Python (2.7.12), I get the following error when attempting to run mozregression 2.3.8:

> Traceback (most recent call last):
>   File "C:\Python27\Scripts\", line 11, in <module>
>     load_entry_point('mozregression==2.3.8', 'console_scripts', 'mozregression')()
>   File "C:\Python27\lib\site-packages\mozregression\", line 302, in main
>     check_mozregression_version()
>   File "C:\Python27\lib\site-packages\mozregression\", line 269, in check_mozregression_version
>     mozregression_version = pypi_latest_version()
>   File "C:\Python27\lib\site-packages\mozregression\", line 264, in pypi_latest_version
>     return requests.get(url, timeout=10).json()['info']['version']
>   File "C:\Python27\lib\site-packages\requests\", line 70, in get
>     return request('get', url, params=params, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\", line 56, in request
>     return session.request(method=method, url=url, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\", line 488, in request
>     resp = self.send(prep, **send_kwargs)
>   File "C:\Python27\lib\site-packages\requests\", line 609, in send
>     r = adapter.send(request, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\", line 423, in send
>     timeout=timeout
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\", line 594, in urlopen
>     chunked=chunked)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\", line 350, in _make_request
>     self._validate_conn(conn)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\", line 835, in _validate_conn
>     conn.connect()
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\",line 330, in connect
>     cert = self.sock.getpeercert()
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\contrib\", line 324, in getpeercert
>     'subjectAltName': get_subj_alt_name(x509)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\contrib\", line 171, in get_subj_alt_name
>     ext = cert.extensions.get_extension_for_class(
> AttributeError: 'Extensions' object has no attribute 'get_extension_for_class'

A manual workaround seems to be using an older version of "requests" (2.8.1).
Hi Jan, this looks like a problem with requests and/or activestate python. I'd recommend filing a bug upstream, there's not much I can do about this. :(
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Right, so it seems that I had an out of date version of cryptography installed, because requests only includes that as an optional dependency. Since mozregression *does* use SSL requests, maybe a hard dependency (either directly, or indirectly through e.g. pyopenssl) could be added?
Resolution: INCOMPLETE → ---
You need to log in before you can comment on or make changes to this bug.