We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to run this code:
class RuleEng(KnowledgeEngine): @Rule(salience=1) def r1(self): print("Execution r1 second") pass @Rule(salience=2) def r2(self): print("Execution r2 first") pass @Rule(Fact(foo="bar")) def Foo(self): print("Execute Foo") pass engine = RuleEng() engine.reset() engine.declare(Fact(foo="bar")) print(engine.facts) engine.modify(engine.facts[1], foo="bar2") engine.modify(engine.facts[1], foo="bar")
and got this error:
<f-0>: InitialFact() <f-1>: Fact(foo='bar') Traceback (most recent call last): File ***, in <module> engine.modify(engine.facts[1], foo="bar") ~~~~~~~~~~~~^^^ KeyError: 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to run this code:
and got this error:
The text was updated successfully, but these errors were encountered: