LPgenerator/mattermost_bot

Unexpected keyword argument 'header' with websocket-client v0.36.0

Closed this issue · 2 comments

websocket-client version 0.36.0 was released two days ago and is automatically installed through pip.
When running the bot one is greeted with the following error:

Traceback (most recent call last):
  File "./run.py", line 5, in <module>
    Bot().run()
  File "/home/user/.local/lib/python3.5/site-packages/mattermost_bot/bot.py", line 36, in run
    self._dispatcher.loop()
  File "/home/user/.local/lib/python3.5/site-packages/mattermost_bot/dispatcher.py", line 103, in loop
    for self.event in self._client.messages(True, 'posted'):
  File "/home/user/.local/lib/python3.5/site-packages/mattermost_bot/mattermost.py", line 135, in messages
    if not self.connect_websocket():
  File "/home/user/.local/lib/python3.5/site-packages/mattermost_bot/mattermost.py", line 130, in connect_websocket
    "Cookie: MMTOKEN=%s" % self.api.token,
  File "/home/user/.local/lib/python3.5/site-packages/websocket/_core.py", line 487, in create_connection
    skip_utf8_validation=skip_utf8_validation, **options)
TypeError: __init__() got an unexpected keyword argument 'header'

A downgrade to websocket-client==0.34.0 fixes the issue.

Hi. Bug was fixed on websocket-client==0.37.0

I guess it can be closed then.