As said above, my bot crashed last night around the time Reddit had maintenance that lasted for a few. I guess it didn't handle the error well? It was not functioning until I restarted it a few minutes ago. I could be wrong but that is around the time it broke. Here is the log below.
INFO:__main__:/r/Saber: processing feed
DEBUG:__main__:/r/Saber:setting up extra headers for HTTP request.
DEBUG:__main__:(None, None)
DEBUG:__main__:/r/Saber:no stored lastmodified
DEBUG:__main__:/r/Saber:no stored ETag
DEBUG:__main__:/r/Saber:sending http request for https://www.reddit.com/r/Saber/new/.rss
DEBUG:__main__:<ClientResponse(https://www.reddit.com/r/Saber/new/.rss) [504 Gateway Timeout]>
<CIMultiDictProxy('Content-Type': 'text/html; charset=UTF-8', 'Content-Length': '5768', 'Accept-Ranges': 'by tes', 'Date': 'Thu, 30 Mar 2017 05:00:53 GMT', 'Via': '1.1 varnish', 'Connection': 'keep-alive', 'X-Served-By': 'cache-or d1728-ORD', 'X-Cache': 'MISS', 'X-Cache-Hits': '0', 'X-Timer': 'S1490850053.100418,VS0,VE20', 'Cache-Control': 'private, max-age=3600', 'Server': 'snooserv')>
DEBUG:__main__:/r/Saber:HTTP error: 504
ERROR:__main__:/r/Saber:Unexpected error:
ERROR:__main__:Traceback (most recent call last):
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 488, in backgroun d_check_feed
raise HTTPError()
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_exceptions.py", line 77, in __init__
body=body, text=text, content_type=content_type)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 832, in __init__
super().__init__(status=status, reason=reason, headers=headers)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 419, in __init__
self.set_status(status, reason)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 463, in set_status
self._status = int(status)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
ERROR:__main__:/r/Saber:giving up
DEBUG:__main__:/r/Saber:sleeping for 60 seconds
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<background_check_feed() done, defined at /var/www/vhosts/<censored>/bots/sabe r_rss/discord_feedbot/feed2discord.py:354> exception=TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'",) created at /var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py:772>
source_traceback: Object created at (most recent call last):
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 772, in <module>
loop.create_task(background_check_feed(feed, loop))
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 488, in backgroun d_check_feed
raise HTTPError()
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_exceptions.py", line 77, in __init__
body=body, text=text, content_type=content_type)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 832, in __init__
super().__init__(status=status, reason=reason, headers=headers)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 419, in __init__
self.set_status(status, reason)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_reqrep.py", line 463, in set_status
self._status = int(status)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
/usr/local/lib/python3.5/dist-packages/aiohttp/connector.py:59: ResourceWarning: Unclosed connection Connect ion<('www.reddit.com', 443, True)>
ResourceWarning)
ERROR:asyncio:Unclosed connection
client_connection: Connection<('www.reddit.com', 443, True)>
source_traceback: Object created at (most recent call last):
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 778, in <module>
loop.run_until_complete(client.connect())
File "/usr/lib/python3.5/asyncio/base_events.py", line 375, in run_until_complete
self.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 345, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1304, in _run_once
handle._run()
File "/usr/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib/python3.5/asyncio/tasks.py", line 307, in _wakeup
self._step()
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 465, in backgroun d_check_feed
headers=http_headers)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 555, in __iter__
resp = yield from self._coro
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 198, in _request
conn = yield from self._connector.connect(req)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/connector.py", line 320, in connect
conn = Connection(self, key, req, transport, proto, self._loop)
/usr/local/lib/python3.5/dist-packages/aiohttp/client_reqrep.py:585: ResourceWarning: Unclosed response <Cli entResponse(https://www.reddit.com/r/Saber/new/.rss) [504 Gateway Timeout]>
<CIMultiDictProxy('Content-Type': 'text/html; charset=UTF-8', 'Content-Length': '5768', 'Accept-Ranges': 'by tes', 'Date': 'Thu, 30 Mar 2017 05:00:53 GMT', 'Via': '1.1 varnish', 'Connection': 'keep-alive', 'X-Served-By': 'cache-or d1728-ORD', 'X-Cache': 'MISS', 'X-Cache-Hits': '0', 'X-Timer': 'S1490850053.100418,VS0,VE20', 'Cache-Control': 'private, max-age=3600', 'Server': 'snooserv')>
ResourceWarning)
ERROR:asyncio:Unclosed response
client_response: <ClientResponse(https://www.reddit.com/r/Saber/new/.rss) [504 Gateway Timeout]>
<CIMultiDictProxy('Content-Type': 'text/html; charset=UTF-8', 'Content-Length': '5768', 'Accept-Ranges': 'by tes', 'Date': 'Thu, 30 Mar 2017 05:00:53 GMT', 'Via': '1.1 varnish', 'Connection': 'keep-alive', 'X-Served-By': 'cache-or d1728-ORD', 'X-Cache': 'MISS', 'X-Cache-Hits': '0', 'X-Timer': 'S1490850053.100418,VS0,VE20', 'Cache-Control': 'private, max-age=3600', 'Server': 'snooserv')>
source_traceback: Object created at (most recent call last):
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 778, in <module>
loop.run_until_complete(client.connect())
File "/usr/lib/python3.5/asyncio/base_events.py", line 375, in run_until_complete
self.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 345, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1304, in _run_once
handle._run()
File "/usr/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib/python3.5/asyncio/tasks.py", line 307, in _wakeup
self._step()
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/var/www/vhosts/<censored>/bots/saber_rss/discord_feedbot/feed2discord.py", line 465, in backgroun d_check_feed
headers=http_headers)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 555, in __iter__
resp = yield from self._coro
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 200, in _request
resp = req.send(conn.writer, conn.reader)
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client_reqrep.py", line 517, in send
self.response._post_init(self.loop)
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.104 seconds
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.125 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.135 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.120 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.126 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.130 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')
WARNING:asyncio:Executing <Task pending coro=<Client.connect() running at /usr/local/lib/python3.5/dist-pack ages/discord/client.py:414> wait_for=<Future pending cb=[Task._wakeup()] created at /usr/lib/python3.5/asyncio/base_event s.py:252> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:164] created at /usr/lib/python3.5/as yncio/base_events.py:367> took 0.145 seconds
INFO:__main__:Logged in as 'Saber' ('168018476525551616')