Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2' #99

@zablotski

Description

@zablotski

Hello. I have problem with readme example.
OS: Mint 17.1
Python: 2.7

Traceback (most recent call last):
  File "hyper_test.py", line 4, in <module>
    conn.request('GET', '/')
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 149, in request
    self.endheaders(message_body=body, final=True, stream_id=stream_id)
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 310, in endheaders
    self.connect()
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 204, in connect
    sock = wrap_socket(sock, self.host)
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/tls.py", line 33, in wrap_socket
    _context = _init_context()
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/tls.py", line 53, in _init_context
    context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'

I have no experience with python, maybe I'm doing something wrong.
Regards,
Yevgeny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions