Sometimes when I try to run the bot script it halts throwing an error. It seems that the slack server isn't responding to slackbot. Wouldn't be good to retry when this kind of exception happens?
Here's the full traceback:
bot.run()
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/slackbot/bot.py", line 34, in run
self._client.rtm_connect()
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/slackbot/slackclient.py", line 42, in rtm_connect
self.parse_slack_login_data(reply)
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/slackbot/slackclient.py", line 63, in parse_slack_login_data
self.websocket = create_connection(self.login_data['url'])
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/websocket/_core.py", line 489, in create_connection
websock.connect(url, **options)
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/websocket/_core.py", line 216, in connect
options.pop('socket', None))
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/websocket/_http.py", line 60, in connect
addrinfo_list, need_tunnel, auth = _get_addrinfo_list(hostname, port, is_secure, proxy)
File "/home/user/.virtualenvs/slackbot/lib/python2.7/site-packages/websocket/_http.py", line 88, in _get_addrinfo_list
addrinfo_list = socket.getaddrinfo(hostname, port, 0, 0, socket.SOL_TCP)
gaierror: [Errno -2] Name or service not known
Sometimes when I try to run the bot script it halts throwing an error. It seems that the slack server isn't responding to slackbot. Wouldn't be good to retry when this kind of exception happens?
Here's the full traceback: