wee-slack: WS ERROR with latest weechat

Thank you for this awesome plugin! 🙏

I’m seeing a very strange issue with wee-slack when using the latest weechat. I’m getting a Python WS ERROR as soon as I try to send a message somewhere. I’m using ArchLinux and see this issue as soon as I use either weechat@2.3-2 or weechat-git.

As soon as I downgrade to weechat@2.3-1 it works as expected. What is even more strange is that the difference, from what I can see, between weechat@2.3-1 and weechat@2.3-2 is Ruby rebuild for 2.6.

I can easily replicate this and I’ve tried it so far on three machines. Let me know how I can further help to solve this issue! 🍻

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 28 (14 by maintainers)

Most upvoted comments

I see that Arch has actually applied my patch to the package. So if you’re using Arch, and websocket-client installed with pacman, you can just update.

I think so and I am on Arch Linux too

@trygveaa

Currently running the latest commit on master (82c00c5a574b5cb9f78852acb9b8ba77ea89458f).

The slack buffer is continuously outputting:

Failed connecting to slack team {secret}, retrying.

The slack-debug buffer is continuously outputting:

DEBUG: connect failed with exception:
Traceback (most recent call last):
  File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 1184, in connect
    ws = create_connection(self.ws_url, sslopt=sslopt_ca_certs)
  File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 511, in create_connection
    websock.connect(url, **options)
  File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 220, in connect
    options.pop('socket', None))
  File "/usr/lib/python2.7/site-packages/websocket/_http.py", line 120, in connect
    sock = _open_socket(addrinfo_list, options.sockopt, options.timeout)
  File "/usr/lib/python2.7/site-packages/websocket/_http.py", line 186, in _open_socket
    raise error
error: [Errno 4] Interrupted system call

When trying to send a message the weechat buffer outputs:

python: stdout/stderr (slack): Traceback (most recent call last):
python: stdout/stderr (slack):   File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 126, in wrapper
python: stdout/stderr (slack):     return f(*decode_from_utf8(args), **decode_from_utf8(kwargs))
python: stdout/stderr (slack):   File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 741, in buffer_input_callback
python: stdout/stderr (slack):     channel.send_message(data)
python: stdout/stderr (slack):   File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 1618, in send_message
python: stdout/stderr (slack):     self.team.send_to_websocket(request)
python: stdout/stderr (slack):   File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 1236, in send_to_websocket
python: stdout/stderr (slack):     self.set_disconnected()
python: stdout/stderr (slack):   File "/home/sqve/.weechat/python/autoload/wee_slack.py", line 1213, in set_disconnected
python: stdout/stderr (slack):     w.unhook(self.hook)
python: stdout/stderr (slack): AttributeError: 'SlackTeam' object has no attribute 'hook'
=!= python: error in function "buffer_input_callback"

Give me a ping if I can provide anything else.