AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

htmengine

#1

After starting HTM engine using supervisord -c ~/numenta-apps/taurus_engine/conf-user/supervisord.conf --logfile /tmp/htm.log --loglevel info, I’m seeing this error in the taurus_metric_collectors log in HTM Engine.

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/mellertson/Downloads/numenta-apps/htmengine/htmengine/monitors/rmq_metric_collector_agent.py”, line 52, in
import requests
File “/home/mellertson/.local/lib/python2.7/site-packages/requests/init.py”, line 53, in
from .packages.urllib3.contrib import pyopenssl
File “/home/mellertson/.local/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py”, line 43, in
ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
AttributeError: ‘module’ object has no attribute ‘PROTOCOL_SSLv3’

From what I read on StackOverflow, it seems to be an issue with urllib3, no with pyopenssl.
I fixed it by upgrading pip install requests==2.6.0. But after doing so, I attempted to taurus-reset-collectorsdb, and that threw a similar error stating requests v2.0.1 is required.

I then uninstalled the requests package, and re-installed using pip install requests==2.0.1.

With version 2.0.1 installed, taurus-reset-collectorsdb ran without error. But now I’m getting the first error again.

It seems I’m caught chasing myself around the mulberry bush, so to speak. It seems like a versioning issue. Just now I was going to try installing the very next version higher than 2.0.1, with the hope one of the versions in between 2.0.1 and 2.6.0 might avoid both errors. But, on PyPi, the release history for the requests package only shows back to 2.10.0.

It seems I’m a bit stuck. Anyone have any suggestions?


#2

I just uninstalled requests and re-installed pip install requests==2.2.1 and that seems to have done the trick.