If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

REOPENED
Unassigned

Status

Testing
mozregression
REOPENED
9 months ago
9 months ago

People

(Reporter: JanH, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 months ago
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\mozregression-script.py", line 11, in <module>
>     load_entry_point('mozregression==2.3.8', 'console_scripts', 'mozregression')()
>   File "C:\Python27\lib\site-packages\mozregression\main.py", line 302, in main
>     check_mozregression_version()
>   File "C:\Python27\lib\site-packages\mozregression\main.py", line 269, in check_mozregression_version
>     mozregression_version = pypi_latest_version()
>   File "C:\Python27\lib\site-packages\mozregression\main.py", line 264, in pypi_latest_version
>     return requests.get(url, timeout=10).json()['info']['version']
>   File "C:\Python27\lib\site-packages\requests\api.py", line 70, in get
>     return request('get', url, params=params, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\api.py", line 56, in request
>     return session.request(method=method, url=url, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\sessions.py", line 488, in request
>     resp = self.send(prep, **send_kwargs)
>   File "C:\Python27\lib\site-packages\requests\sessions.py", line 609, in send
>     r = adapter.send(request, **kwargs)
>   File "C:\Python27\lib\site-packages\requests\adapters.py", line 423, in send
>     timeout=timeout
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 594, in urlopen
>     chunked=chunked)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 350, in _make_request
>     self._validate_conn(conn)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 835, in _validate_conn
>     conn.connect()
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\connection.py",line 330, in connect
>     cert = self.sock.getpeercert()
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\contrib\pyopenssl.py", line 324, in getpeercert
>     'subjectAltName': get_subj_alt_name(x509)
>   File "C:\Python27\lib\site-packages\requests\packages\urllib3\contrib\pyopenssl.py", 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. :(
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → INCOMPLETE
(Reporter)

Comment 2

9 months ago
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?
(Reporter)

Updated

9 months ago
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
You need to log in before you can comment on or make changes to this bug.