Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack channels.*, groups.*, im.*, & mpim.* APIs will stop working on Feb 24, 2021 #220

Open
adibendahan opened this issue Sep 23, 2020 · 6 comments

Comments

@adibendahan
Copy link

adibendahan commented Sep 23, 2020

os/slacker uses im.open and it will stop working on Feb 24, 2021 according to this Slack announcement

Today we are announcing the deprecation of the methods that preceded the Conversations API (channels., groups., im., & mpim.). On February 24th, 2021 these methods will retire and cease functioning.

In order to continue support for this bot, replace the usage of os/slacker with official python-slackclient.

@adibendahan
Copy link
Author

I can try to do it myself if there's demand for it. Hit the +1 if you're interested.

@scottsue
Copy link

scottsue commented Oct 6, 2020

Not exactly too sure if this is related. However I'm starting to see these errors, there were no issues with this last week so I suspect that Slack may have changed things on their side?

failed to handle message say hi to me with plugin "direct_hello"
Traceback (most recent call last):
File "/home/apps/chatops/rosie/lib/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler
func(Message(self._client, msg), *args)
File "/home/apps/chatops/rosie/lib/slackbot/plugins/hello.py", line 63, in direct_hello
message.direct_reply("Here you are")
File "/home/apps/chatops/rosie/lib/slackbot/dispatcher.py", line 185, in wrapped
return func(self, text, *a, **kw)
File "/home/apps/chatops/rosie/lib/slackbot/dispatcher.py", line 274, in direct_reply
channel_id = self._client.open_dm_channel(self._get_user_id())
File "/home/apps/chatops/rosie/lib/slackbot/slackclient.py", line 156, in open_dm_channel
return self.webapi.im.open(user_id).body["channel"]["id"]
File "/usr/local/lib/python3.6/site-packages/slacker/init.py", line 617, in open
return self.post('im.open', data={'user': user})
File "/usr/local/lib/python3.6/site-packages/slacker/init.py", line 126, in post
api, **kwargs
File "/usr/local/lib/python3.6/site-packages/slacker/init.py", line 102, in _request
raise Error(response.error)
slacker.Error: method_deprecated

@scottsue
Copy link

scottsue commented Oct 6, 2020

Just further to my comment above, it looks like there was an issue on the Slack side, things are working as usual now

@dephekt
Copy link

dephekt commented Feb 13, 2021

@adibendahan Did you get started on this migration already? If so and if you need some help, I'd be happy to pitch in. I have a bot I rely on that is built around slackbot and would love to avoid having to abandon my current project and find some other solution.

Edit: Disregard that. After further investigation it looks like this project has been superseded by the official Slack Bolt Python project, so I don't think it's worth the effort maintaining a community supported clone (which probably explains why no one is jumping at the opportunity to maintain slacker or slackbot). For anyone that needs this functionality, have a look at Bolt Python. It uses similar concepts like having decorators over handler functions to take actions on events or messages and is officially supported.

@nhiguchi-stb
Copy link

Today, my app using slackbot also stopped working...

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler
    func(Message(self._client, msg), *args)
slacker.Error: method_deprecated

@mzanrosso
Copy link

mzanrosso commented Feb 28, 2021

Today, my app using slackbot also stopped working...

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler
    func(Message(self._client, msg), *args)
slacker.Error: method_deprecated

me too...

[ERROR] - 2021-02-27 21:41:27,103 -     slackbot.dispatcher - : failed to handle message help with plugin "help" in /root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slackbot/dispatcher.py:57
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler
    func(Message(self._client, msg), *args)
  File "/usr/src/slackbot/lib/plugins/basics.py", line 45, in help
    message.direct_reply(helpmessage)
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slackbot/dispatcher.py", line 185, in wrapped
    return func(self, text, *a, **kw)
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slackbot/dispatcher.py", line 274, in direct_reply
    channel_id = self._client.open_dm_channel(self._get_user_id())
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slackbot/slackclient.py", line 156, in open_dm_channel
    return self.webapi.im.open(user_id).body["channel"]["id"]
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slacker/__init__.py", line 617, in open
    return self.post('im.open', data={'user': user})
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slacker/__init__.py", line 124, in post
    return self._request(
  File "/root/.local/share/virtualenvs/slackbot-D-S5LRy0/lib/python3.8/site-packages/slacker/__init__.py", line 102, in _request
    raise Error(response.error)
slacker.Error: method_deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants