Hyperclaw79 / HyperAI

A python chatbot that uses cleverbot.io's API.Made for chatting with CharlesTheAI.
30 stars 7 forks source link

Brain crash (probably cleverbot.io connectivity error?) #4

Closed REALMWTH closed 6 years ago

REALMWTH commented 6 years ago
Traceback (most recent call last):
  File "C:\Users\Администратор.WIN-3HEG540DEL8\Desktop\HyperAI-master\brain.py", line 24, in create
    async with self.sess.post('https://cleverbot.io/1.0/create', json=self.body) as resp:
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\aiohttp\client.py", line 603, in __aenter__
    self._resp = yield from self._coro
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\aiohttp\client.py", line 241, in _request
    yield from resp.start(conn, read_until_eof)
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\aiohttp\client_reqrep.py", line 559, in start
    (message, payload) = yield from self._protocol.read()
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\aiohttp\streams.py", line 509, in read
    yield from self._waiter
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py", line 310, in _wakeup
    future.result()
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\asyncio\futures.py", line 286, in result
    raise CancelledError
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\discord\client.py", line 225, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 31, in on_ready
    created_brain = await self.brain.create()
  File "C:\Users\Администратор.WIN-3HEG540DEL8\Desktop\HyperAI-master\brain.py", line 25, in create
    r = await resp.json()
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\async_timeout\__init__.py", line 45, in __exit__
    self._do_exit(exc_type)
  File "C:\Users\Администратор.WIN-3HEG540DEL8\AppData\Local\Programs\Python\Python35\lib\site-packages\async_timeout\__init__.py", line 92, in _do_exit
    raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
Hyperclaw79 commented 6 years ago

Timeout errors. I think I'll remove the time constraints and give the cleverbot.io api some time to react.

Hyperclaw79 commented 6 years ago

Should be fixed in https://github.com/Hyperclaw79/HyperAI/commit/0970b2febeba7fe4186a87022916787aa3d73702.