ich habe einen Discordbot mit ein paar anderen Dingen (SQlite Datenbank, Youtube Abfrage, etc.).
Der Bot wurde mir in großen Teilen gebaut, kleine Sachen hab ich selbst erledigt. Leider bekommt der Bot nach ca 4-5h regelmäßig folgende Fehlermeldung
Traceback (most recent call last):
File "C:\Users\xxx\discordbot_test.py", line 411, in <module>
client.run(token)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 519, in run
self.loop.run_until_complete(self.start(*args, **kwargs))
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\base_events.py", line 466, in run_until_complete
return future.result()
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 293, in result
raise self._exception
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py", line 239, in _step
result = coro.send(None)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 491, in start
yield from self.connect()
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 448, in connect
yield from self.ws.poll_event()
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\gateway.py", line 431, in poll_event
yield from self.received_message(msg)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\gateway.py", line 341, in received_message
yield from self.close()
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\websockets\protocol.py", line 561, in close
yield from asyncio.shield(self.close_connection_task)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 382, in __iter__
return self.result() # May raise too.
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 293, in result
raise self._exception
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py", line 239, in _step
result = coro.send(None)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\gateway.py", line 522, in close_connection
yield from super().close_connection(force=force)
TypeError: close_connection() got an unexpected keyword argument 'force'
Task was destroyed but it is pending!
task: <Task pending coro=<list_servers() running at C:\Users\xxx\discordbot_test.py:403> wait_for=<Future pending cb=[Task._wakeup()]>>
Leider weiß ich echt nicht woran es liegt. Die Internetverbindung steht eigentlich und ist per LAN verbunden. Was kann ich noch machen? Alternativ wäre auch ein automatischer Neustart dafür ganz gut. Leider weiß ich nicht wie ich das umsetzten kann.
Hoffe ihr könnt mir helfen.