1

Today I started coding bot in Mattermost and ran into problem.

client = Driver({
    "url": "chat my company",
    'token': 'token',
    'scheme': 'https',
    'host': 'chat my company',
    'port': 8082,
    'basepath': '/api/v4',
    'verify': True,  # Or /path/to/file.pem
    'mfa_token': 'token idk',
    'auth': None,
    'timeout': 30,
    'request_timeout': None,
    'keepalive': False,
    'keepalive_delay': 5,
    'websocket_kw_args': None,
    'debug': False
})

client.login()

async def my_event_handler(message):
    print(message)
    pass

client.init_websocket(my_event_handler)

When start init_websocket, I have error on Windows 10 Failed to establish websocket connection: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801), but on Linux it doesn't occur.

How can I fix that?

kacper1236
  • 144
  • 8

0 Answers0