pybitcoin icon indicating copy to clipboard operation
pybitcoin copied to clipboard

NamecoindClient ssl 'module' object has no attribute '_create_unverified_context'

Open ghost opened this issue 10 years ago • 3 comments

Ubuntu 14.04 python 2.7.8 pybitcoin==0.8.2

>>> from pybitcoin.rpc import NamecoindClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pybitcoin/rpc/__init__.py", line 14, in <module>
    from .namecoind_client import NamecoindClient
  File "/usr/local/lib/python2.7/dist-packages/pybitcoin/rpc/namecoind_client.py", line 20, in <module>
    ssl._create_default_https_context = ssl._create_unverified_context
AttributeError: 'module' object has no attribute '_create_unverified_context'

ghost avatar Jun 26 '15 08:06 ghost

Thanks for submitting. Will have a look.

muneeb-ali avatar Jun 26 '15 13:06 muneeb-ali

Hi @VogonogoV,

ssl._create_unverified_context is present in Python 2.7.9 and later. If you can get a hold of a later Python, that should solve your problem.

In the mean time, I will see if I can add a work-around that works in 2.7.8.

Thanks!

jcnelson avatar Jun 26 '15 18:06 jcnelson

Hi @VogonogoV

I just pushed a possible fix to the branch ssl_noverify_oldpython. Can you checkout that branch and give it a try?

Thanks!

jcnelson avatar Jun 26 '15 18:06 jcnelson