加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – 无法将bot连接到Bale messenger API:网络连接已断开

发布时间:2020-12-20 11:04:31 所属栏目:Python 来源:网络整理
导读:我正在尝试我的第一个机器人在贝尔信使,但我不能并且面对这个错误.这里有人帮我吗? 2018-05-05 11:13:47,938 network.py:112 WARNING:"network connection disconnected." 2018-05-05 11:13:47,939 network.py:36 ERROR:"connect error: 500,message='Inval
我正在尝试我的第一个机器人在贝尔信使,但我不能并且面对这个错误.这里有人帮我吗?

2018-05-05 11:13:47,938  network.py:112  WARNING:"network connection disconnected."
 2018-05-05 11:13:47,939  network.py:36  ERROR:"connect error: 500,message='Invalid response status'"
 Traceback (most recent call last): 
 File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/balebot/connection/network.py",line 31,in connect self._ws = await self._session.ws_connect(self.construct_url()) 
 File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/aiohttp/helpers.py",line 109,in __await__ ret = yield from self._coro
 File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/aiohttp/client.py",line 465,in _ws_connect
 headers=resp.headers) aiohttp.client_exceptions.WSServerHandshakeError: 500,message='Invalid response status'

解决方法

看来你使用websocket将你的bot连接到服务器.现在是握手错误.确保你从botfather给出的令牌是正确的.如果没有问题,可能是您的服务器地址.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读