Skip to content

IndexError: list index out of range in chatterbotapi.py #3

@ufa

Description

@ufa

Hello,
One more stability issue. I am getting a lot of those regularly:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.__target(_self.__args, *_self.__kwargs)
File "bot.py", line 178, in bot
AI(group,peer,message)
File "bot.py", line 84, in AI
reply=callmodule(message,peer)
File "bot.py", line 62, in callmodule
reply = botsessions[peer].think(message)
File ".../python-telegram-bot/chatterbotapi.py", line 58, in think
return self.think_thought(thought).text
File "/.../python-telegram-bot/chatterbotapi.py", line 152, in think_thought
response_thought.text = response_dom.getElementsByTagName('that')[0].childNodes[0].data.strip()
IndexError: list index out of range

I not sure if it is a issue on chatterbotapi.py or in bot.py, so I have opened this issue so you can take a look.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions