【问题标题】:slack rtm_connect is not returning the outputslack rtm_connect 没有返回输出
【发布时间】:2019-06-05 02:54:31
【问题描述】:

当运行 slack bot 失败并出现以下错误时,同时 api_calls api.test,auth.test 似乎工作正常,知道如何解决这个问题吗?我错过了什么吗?

错误:

 No handlers could be found for logger "slackclient.client"
 Connection Failed

代码片段:

from slackclient import SlackClient
import os


slack_token = os.environ["SLACKBOT_LUMBERGH_TOKEN"]
sc = SlackClient(slack_token)

if sc.rtm_connect():
    while sc.server.connected is True:
        print sc.rtm_read()
        time.sleep(1)
else:
    print "Connection Failed"

当我添加时

print slack_client.api_call("api.test")
print slack_client.api_call("auth.test")

它返回值。我在这里有什么遗漏吗?

谢谢!

【问题讨论】:

    标签: python slack


    【解决方案1】:

    我将python和pip升级到最新,之后运行顺利。

    【讨论】:

      猜你喜欢
      • 2019-01-04
      • 2017-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 2016-12-20
      • 1970-01-01
      • 2019-07-11
      相关资源
      最近更新 更多