DeForce / LalkaChat

LalkaChat multichat
http://czt.lv
GNU General Public License v3.0
24 stars 6 forks source link

Offline startup #95

Closed mokrinsky closed 7 years ago

mokrinsky commented 8 years ago

While trying to start chat without internet connection, it shows some uncought exceptions. Full tracelog:

C:\Python27\python.exe main.py
INFO:main:Loading basic configuration
INFO:main:Loading Messaging Handler
INFO:main:Loading Queue for message handling
INFO:messaging:Loading configuration file for messaging
INFO:messaging:Loading webchat
INFO:messaging:Loading logger
ERROR:cherrypy.error:[12/Oct/2016:10:41:58] ENGINE Set handler for console events.
INFO:messaging:Loading df
INFO:messaging:Loading mentions
INFO:messaging:Loading c2b
INFO:messaging:Loading blacklist
INFO:messaging:Loading levels
INFO:main:Loading Chats
INFO:main:Loading chat module: goodgame
INFO:main:found goodgame
INFO:goodgame:Initializing goodgame chat
INFO:main:Loading chat module: sc2tv
INFO:main:found sc2tv
INFO:sc2tv:Initializing funstream chat
INFO:main:Loading chat module: twitch
INFO:main:found twitch
INFO:twitch:Initializing twitch chat
ERROR:sc2tv:Unable to get smiles
ERROR:goodgame:Unable to download smiles, error HTTPConnectionPool(host='api2.goodgame.ru', port=80): Max retries exceeded with url: /smiles (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E22430>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPConnectionPool(host='api2.goodgame.ru', port=80): Max retries exceeded with url: /smiles (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E22430>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
INFO:main:Loading GUI Interface
> WARNING:goodgame:Unable to get channel name, error HTTPConnectionPool(host='api2.goodgame.ru', port=80): Max retries exceeded with url: /streams/CzT (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E3B530>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPConnectionPool(host='api2.goodgame.ru', port=80): Max retries exceeded with url: /streams/CzT (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E3B530>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
ERROR:twitch:Unable to get server list, error: HTTPConnectionPool(host='tmi.twitch.tv', port=80): Max retries exceeded with url: /servers?channel=CzT1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E22D10>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPConnectionPool(host='tmi.twitch.tv', port=80): Max retries exceeded with url: /servers?channel=CzT1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E22D10>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
Exception in thread Thread-18:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "E:\PycharmProjects\LalkaChat\modules\chats\sc2tv.py", line 208, in run
    ws = fsChat(self.socket, self.queue, self.nick, protocols=['websocket'], smiles=self.smiles,)
  File "E:\PycharmProjects\LalkaChat\modules\chats\sc2tv.py", line 25, in __init__
    self.channel_id = self.fsGetId()
  File "E:\PycharmProjects\LalkaChat\modules\chats\sc2tv.py", line 125, in fsGetId
    request = requests.post("http://funstream.tv/api/user", data=payload)
  File "C:\Python27\lib\site-packages\requests\api.py", line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Python27\lib\site-packages\requests\api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\lib\site-packages\requests\adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='funstream.tv', port=80): Max retries exceeded with url: /api/user (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x07E3B570>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

Exception in thread Thread-17:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "E:\PycharmProjects\LalkaChat\modules\chats\goodgame.py", line 165, in run
    ws.connect()
  File "C:\Python27\lib\site-packages\ws4py\client\__init__.py", line 210, in connect
    self.sock.connect(self.bind_addr)
  File "C:\Python27\lib\socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno 11001] getaddrinfo failed

WARNING:twitch:Unable to get BTTV smiles, error HTTPSConnectionPool(host='api.betterttv.net', port=443): Max retries exceeded with url: /emotes (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07CE6E90>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPSConnectionPool(host='api.betterttv.net', port=443): Max retries exceeded with url: /emotes (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07CE6E90>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
WARNING:twitch:Unable to get twitch badges, error HTTPSConnectionPool(host='api.twitch.tv', port=443): Max retries exceeded with url: /kraken/chat/CzT1/badges (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07E3BAD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPSConnectionPool(host='api.twitch.tv', port=443): Max retries exceeded with url: /kraken/chat/CzT1/badges (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07E3BAD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
WARNING:twitch:Unable to get twitch undocumented api badges, error HTTPSConnectionPool(host='badges.twitch.tv', port=443): Max retries exceeded with url: /v1/badges/global/display (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07E3BC30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Args: (MaxRetryError("HTTPSConnectionPool(host='badges.twitch.tv', port=443): Max retries exceeded with url: /v1/badges/global/display (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x07E3BC30>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))",),)
Exception in thread Thread-19:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "E:\PycharmProjects\LalkaChat\modules\chats\twitch.py", line 177, in run
    irc_client.connect(self.host, self.port, self.nickname)
  File "C:\Python27\lib\site-packages\irc\client.py", line 1217, in connect
    self.connection.connect(*args, **kwargs)
  File "C:\Python27\lib\site-packages\irc\functools.py", line 46, in wrapper
    return method(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\irc\client.py", line 501, in connect
    raise ServerConnectionError("Couldn't connect to socket: %s" % ex)
ServerConnectionError: Couldn't connect to socket: [Errno 11001] getaddrinfo failed

INFO:chat_gui:Application is on top

Process finished with exit code 1
DeForce commented 8 years ago

Good point, will need to catch more errors...

DeForce commented 7 years ago

Can you try it now from develop branch?