It's trapping in to an infinite loop, how can I solve that? This is the error.log from the beginning to KeyboardInterrupt.
WARNING: maximum recursion depth exceeded (input='xlearnfact')WARNING: maximum recursion depth exceeded (input='XEDUCATE WHAT IS .........
........XSPLIT a language XSPLIT')WARNING: maximum recursion depth exceeded (input='xlearnfact')Traceback (most recent call last):
File "main2.py", line 5, in <module>
print kernel.respond("Learn the sun is hot")
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 329, in respond
response = self._respond(s, sessionID)
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 394, in _respond
response += self._processElement(elem, sessionID).strip()
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 425, in _processElement
return handlerFunc(elem, sessionID)
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 928, in _processTemplate
response += self._processElement(e, sessionID)
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 425, in _processElement
return handlerFunc(elem, sessionID)
.
.
.
.
return handlerFunc(elem, sessionID)
File "/usr/local/lib/python2.7/dist-packages/aiml/Kernel.py", line 871, in _processStar
response = self._brain.star("star", input, that, topic, index)
File "/usr/local/lib/python2.7/dist-packages/aiml/PatternMgr.py", line 181, in star
patMatch, template = self._match(input.split(), thatInput.split(), topicInput.split(), self._root)
File "/usr/local/lib/python2.7/dist-packages/aiml/PatternMgr.py", line 325, in _match
pattern, template = self._match(suf, thatWords, topicWords, root[self._STAR])
File "/usr/local/lib/python2.7/dist-packages/aiml/PatternMgr.py", line 307, in _match
pattern, template = self._match(suffix, thatWords, topicWords, root[first])
File "/usr/local/lib/python2.7/dist-packages/aiml/PatternMgr.py", line 325, in _match
pattern, template = self._match(suf, thatWords, topicWords, root[self._STAR])
File "/usr/local/lib/python2.7/dist-packages/aiml/PatternMgr.py", line 320, in _match
if root.has_key(self._STAR):
KeyboardInterrupt
import aiml
kernel = aiml.Kernel()
kernel.learn("learn.aiml")
print kernel.respond("Learn the sun is hot")
import aiml
kernel = aiml.Kernel()
sessionId = 12345
kernel.getSessionData(sessionId)
kernel.learn("learn.aiml")
print kernel.respond("Learn the sun is hot")
Hey @creatorrr , thanks for this great library!
I'm facing with a problem while trying to use these learn.aiml files with your library.
Mitsuku: http://www.square-bear.co.uk/aiml/learn.zip
ALICE: http://alicebot.wikidot.com/learn-aiml (WRONG/OUTDATED)
It's trapping in to an infinite loop, how can I solve that? This is the error.log from the beginning to KeyboardInterrupt.
stderr:
With these usage attempts both of them has same problem: