It appears that clips.PrintFacts() stops printing after a bad Assert, as below:
>>> clips.PrintFacts()
f-0 (initial-fact)
f-1 (duck)
For a total of 2 facts.
>>> clips.Assert("eagle")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/clips/_clips_wrap.py", line 3152, in Assert
_clips.ClipsError: C12: could not assert
>>>
>>>
>>> clips.Assert("(eagle)")
<Fact 'f-2': fact object at 0x844f700>
>>> clips.FactList()
[<Fact 'f-0': fact object at 0x831bb40>, <Fact 'f-1': fact object at 0x8300280>, <Fact 'f-2': fact object at 0x8300740>]
>>> clips.PrintFacts()
>>>
>>> clips.PrintFacts()
>>> clips.FactList()
[<Fact 'f-0': fact object at 0x83006c0>, <Fact 'f-1': fact object at 0x8300900>, <Fact 'f-2': fact object at 0x844fc60>]
>>>
One would expect no correlation between assert error and fact printing.
Is there a way to 'clean' pyclips enough, after the '... C12: could not assert'
to keep the clips.PrintFacts() operational?
Thanks,
Pyc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it looks like the "(facts)" function does not work after a bad call to Assert(), even when it is called directly via SendCommand(). I have to investigate a little about it, to verify where the problem takes place!
F.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears that clips.PrintFacts() stops printing after a bad Assert, as below:
>>> clips.PrintFacts()
f-0 (initial-fact)
f-1 (duck)
For a total of 2 facts.
>>> clips.Assert("eagle")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/clips/_clips_wrap.py", line 3152, in Assert
_clips.ClipsError: C12: could not assert
>>>
>>>
>>> clips.Assert("(eagle)")
<Fact 'f-2': fact object at 0x844f700>
>>> clips.FactList()
[<Fact 'f-0': fact object at 0x831bb40>, <Fact 'f-1': fact object at 0x8300280>, <Fact 'f-2': fact object at 0x8300740>]
>>> clips.PrintFacts()
>>>
>>> clips.PrintFacts()
>>> clips.FactList()
[<Fact 'f-0': fact object at 0x83006c0>, <Fact 'f-1': fact object at 0x8300900>, <Fact 'f-2': fact object at 0x844fc60>]
>>>
One would expect no correlation between assert error and fact printing.
Is there a way to 'clean' pyclips enough, after the '... C12: could not assert'
to keep the clips.PrintFacts() operational?
Thanks,
Pyc.
Hello,
it looks like the "(facts)" function does not work after a bad call to Assert(), even when it is called directly via SendCommand(). I have to investigate a little about it, to verify where the problem takes place!
F.