stacks-network / pybitcoin

A Bitcoin python library for private + public keys, addresses, transactions, & RPC
MIT License
277 stars 117 forks source link

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

Open ghost opened 9 years ago

ghost commented 9 years ago

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'
muneeb-ali commented 9 years ago

Thanks for submitting. Will have a look.

jcnelson commented 9 years ago

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 commented 9 years ago

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!