japherwocky / j4ne

A chat bot with data visualizations for IRC, Twitch, Discord, and Twitter
2 stars 0 forks source link

discord connection .. timing out? #3

Closed japherwocky closed 7 years ago

japherwocky commented 7 years ago
[I 161129 19:51:11 deescord:63] Connecting to Discord..
[I 161129 19:51:11 client:310] logging in using static token
[E 161129 19:51:11 ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f5bfbfd9b70>, <tornado.concurrent.Future object at 0x7f5bffb62898>)
    Traceback (most recent call last):
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
        ret = callback()
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
        return fn(*args, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
        self.add_future(ret, lambda f: f.result())
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
        yielded = self.gen.throw(*exc_info)
      File "/home/japherwocky/j4ne/networks/deescord.py", line 64, in connect
        yield client.start(discord_token)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
        value = future.result()
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/gen.py", line 285, in wrapper
        yielded = next(result)
      File "<string>", line 6, in _wrap_awaitable
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/client.py", line 456, in start
        yield from self.login(*args, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/client.py", line 382, in login
        yield from getattr(self, '_login_' + str(n))(*args, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/client.py", line 312, in _login_1
        data = yield from self.http.static_login(token, bot=is_bot)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/http.py", line 195, in static_login
        data = yield from self.get(self.ME)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/http.py", line 105, in request
        r = yield from self.session.request(method, url, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 555, in __iter__
        resp = yield from self._coro
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 161, in _request
        raise RuntimeError('Session is closed')
    RuntimeError: Session is closed
japherwocky commented 7 years ago

same, i think:

[E 161220 20:07:47 base_events:1148] Task exception was never retrieved
    future: <Task finished coro=<WebSocketCommonProtocol.run() done, defined at /home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/protocol.py:
407> exception=ConnectionResetError(104, 'Connection reset by peer')>
    Traceback (most recent call last):
      File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
        result = coro.throw(exc)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/protocol.py", line 413, in run
        msg = yield from self.read_message()
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/protocol.py", line 435, in read_message
        frame = yield from self.read_data_frame(max_size=self.max_size)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/protocol.py", line 490, in read_data_frame
        frame = yield from self.read_frame(max_size)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/protocol.py", line 525, in read_frame
        self.reader.readexactly, is_masked, max_size=max_size)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/websockets/framing.py", line 80, in read_frame
        data = yield from reader(2)
      File "/usr/lib/python3.5/asyncio/streams.py", line 670, in readexactly
        block = yield from self.read(n)
      File "/usr/lib/python3.5/asyncio/streams.py", line 627, in read
        yield from self._wait_for_data('read')
      File "/usr/lib/python3.5/asyncio/streams.py", line 457, in _wait_for_data
        yield from self._waiter
      File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
        future.result()
      File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
        raise self._exception
      File "/usr/lib/python3.5/asyncio/selector_events.py", line 669, in _read_ready
        data = self._sock.recv(self.max_size)
    ConnectionResetError: [Errno 104] Connection reset by peer
japherwocky commented 7 years ago
[E 161222 17:08:49 ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7fd26d20e7b8>, <tornado.concurrent.Future object at 0x7fd275d449b0>)
    Traceback (most recent call last):
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
        ret = callback()
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
        return fn(*args, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
        self.add_future(ret, lambda f: f.result())
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
        result = coro.send(None)
      File "/home/japherwocky/j4ne/networks/twatter.py", line 122, in check_tweets
        await self.application.Discord.say(chann, '{} retweets:\n\n{}'.format(tweet['user']['screen_name'], retweet_link))
      File "/home/japherwocky/j4ne/networks/deescord.py", line 85, in say
        msg = await client.send_message(channel, message)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/client.py", line 1152, in send_message
        data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts, embed=embed)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/http.py", line 105, in request
        r = yield from self.session.request(method, url, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 555, in __iter__
        resp = yield from self._coro
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 161, in _request
        raise RuntimeError('Session is closed')
    RuntimeError: Session is closed
[E 161222 17:18:53 ioloop:633] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7fd26f1bd400>, <tornado.concurrent.Future object at 0x7fd26c5f25f8>)
    Traceback (most recent call last):
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback
        ret = callback()
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper
        return fn(*args, **kwargs)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in <lambda>
        self.add_future(ret, lambda f: f.result())
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
        result = coro.send(None)
      File "/home/japherwocky/j4ne/networks/twatter.py", line 94, in check_tweets
        tweets = self._twitter.get_user_timeline(screen_name = tooter['screen_name'])
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/twython/endpoints.py", line 47, in get_user_timeline
        return self.get('statuses/user_timeline', params=params)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/twython/api.py", line 264, in get
        return self.request(endpoint, params=params, version=version)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/twython/api.py", line 258, in request
        api_call=url)
      File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/twython/api.py", line 194, in _request
        retry_after=response.headers.get('X-Rate-Limit-Reset'))
    twython.exceptions.TwythonError: Twitter API returned a 503 (Service Unavailable), Over capacity
japherwocky commented 7 years ago

[E 170110 08:58:46 ioloop:633] Exception in callback functools.partial(<function wrap..null_wrapper at 0x7fea966d3488>, <tornado.concurre nt.Future object at 0x7fea9682f160>) Traceback (most recent call last): File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 604, in _run_callback ret = callback() File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/stack_context.py", line 275, in null_wrapper return fn(*args, kwargs) File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/ioloop.py", line 619, in self.add_future(ret, lambda f: f.result()) File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "", line 3, in raise_exc_info File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/home/japherwocky/j4ne/networks/twatter.py", line 122, in check_tweets await self.application.Discord.say(chann, '{} retweets:\n\n{}'.format(tweet['user']['screen_name'], retweet_link)) File "/home/japherwocky/j4ne/networks/deescord.py", line 85, in say msg = await client.send_message(channel, message) File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/client.py", line 1152, in send_message data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts, embed=embed) File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/discord/http.py", line 105, in request r = yield from self.session.request(method, url, kwargs) File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 555, in iter resp = yield from self._coro File "/home/japherwocky/j4ne/env/lib/python3.5/site-packages/aiohttp/client.py", line 161, in _request raise RuntimeError('Session is closed') RuntimeError: Session is closed