Closed Brook4846 closed 6 years ago
Hi @Brook4846, I couldn't reproduce this issue, was there any other rule in the system? What modules had been loaded?
Prior to the above commands I mentioned, I loaded the following modules on guile with no error.
(use-modules (opencog) (opencog nlp) (opencog nlp relex2logic) (opencog openpsi) (opencog ghost) (opencog ghost procedures))
My relex server is running perfectly.
Unbound variable: prt-say-text
implys that (opencog eva-behavior) module is needed. Maybe you made changes to the code that uses it, and forgot to import the module? or maybe you have a stale guile-cache, that rm -rf ~/.cache/guile/
may fix.
Thanks @AmeBel, It seems the error comes when using prior versions of repos. and (use-modules (opencog eva-behavior)) solves the issue as you mentioned. Also, pulling the latest repos for cogutil, atomspace and opencog will work fine without the error mentioned by @Brook4846, yet a WARNING message appears only the first time we run (test-ghost "...") like this:
scheme@(guile-user)> (use-modules(opencog) (opencog nlp) (opencog nlp relex2logic) (opencog openpsi) (opencog ghost) (opencog ghost procedures)) scheme@(guile-user)> (ghost-parse "u: (hello) hi there") [2018-09-21 12:00:59:318] [WARN] [GHOST] Did you forget to link a goal to the rule? scheme@(guile-user)> (test-ghost "hello") [2018-09-21 12:01:24:535] [WARN] No configuration file was loaded! Param=STARTING_STI_FUNDS [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=STARTING_LTI_FUNDS [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=STI_FUNDS_BUFFER [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=LTI_FUNDS_BUFFER [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=TARGET_LTI_FUNDS [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=TARGET_STI_FUNDS [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=ECAN_STARTING_ATOM_STI_WAGE [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=ECAN_STARTING_ATOM_LTI_WAGE [2018-09-21 12:01:24:536] [WARN] No configuration file was loaded! Param=ECAN_MAX_AF_SIZE [2018-09-21 12:01:24:542] [INFO] [say] (hi there) $1 = ((WordNode "hi") (WordNode "there") ) scheme@(guile-user)> (ghost-parse "u: (robot) how can I help you") [2018-09-21 12:03:50:211] [WARN] [GHOST] Did you forget to link a goal to the rule? scheme@(guile-user)> (test-ghost "robot") [2018-09-21 12:04:08:223] [INFO] [say] (how can I help you) $2 = ((WordNode "how") (WordNode "can") (WordNode "I") (WordNode "help") (WordNode "you") )
Either you are starting the cogserver without configuration file, or the path to it isn't correct.
The best ways to run Ghost would be using this procedure. However, I think one can ignore the warning message if he/she want to run ghost without using ECAN.
My ghost-parse rules execute well. But the test-ghost rules always produce the following error as gibberish as it looks here.
rule =>
(ghost-parse "u: (why) I have no idea")
reply =>[2018-09-13 13:15:07:375] [WARN] [GHOST] Did you forget to link a goal to the rule?
rule =>
(map cog-name (test-ghost "why"))
reply => `[2018-09-13 13:16:57:033] [INFO] [GHOST] Say: "I have no idea"
ERROR: In procedure opencog-extension: Throw to key
C++-EXCEPTION' with args
("psi-imply" "Backtrace:\nIn current input:\n 24:14 9 ()\nIn opencog/ghost/test.scm:\n 39:4 8 (test-ghost )\nIn srfi/srfi-1.scm:\n 592:17 7 (map1 (#))\nIn unknown file:\n 6 (opencog-extension psi-imply (#))\n 5 (apply-smob/1 #<catch-closure 2df7f20>)\n 4 (apply-smob/1 #<catch-closure 2df7ea0>)\nIn opencog/ghost/terms.scm:\n 393:13 3 (ghost-execute-action . )\nIn unknown file:\n 2 (opencog-extension cog-execute! (#))\nIn ice-9/boot-9.scm:\n 751:25 1 (dispatch-exception 0 C++-EXCEPTION (\"cog-execute!\" \"…\"))\nIn unknown file:\n 0 (apply-smob/1 #<catch-closure 2df7e60> C++-EXCEPTION \"…\" …)\n\nERROR: In procedure apply-smob/1:\nIn procedure cog-execute!: Backtrace:\nIn current input:\n 24:14 13 ()\nIn opencog/ghost/test.scm:\n 39:4 12 (test-ghost )\nIn srfi/srfi-1.scm:\n 592:17 11 (map1 (#))\nIn unknown file:\n 10 (opencog-extension psi-imply (#))\n 9 (apply-smob/1 #<catch-closure 2df7f20>)\n 8 (apply-smob/1 #<catch-closure 2df7ea0>)\nIn opencog/ghost/terms.scm:\n 393:13 7 (ghost-execute-action . )\nIn unknown file:\n 6 (opencog-extension cog-execute! (#))\n 5 (apply-smob/1 #<catch-closure 2df77c0>)\nIn ice-9/eval.scm:\n 191:27 4 (_ #f)\n 223:20 3 (proc #<directory (guile-user) 14e5140>)\nIn unknown file:\n 2 (%resolve-variable (7 . prt-say-text) #<directory (guil…>)\nIn ice-9/boot-9.scm:\n 751:25 1 (dispatch-exception 0 unbound-variable (#f \"Unbound …\" …))\nIn unknown file:\n 0 (apply-smob/1 #<catch-closure 2df7780> unbound-variable …)\n\nERROR: In procedure apply-smob/1:\nUnbound variable: prt-say-text\nABORT: unbound-variable\n (/tmp/atomspace-master/opencog/guile/SchemeEval.cc:1055)\nFunction args:\n((PutLink\n (DefinedPredicateNode \"Say\")\n (Node \"I have no idea\")\n)\n)\nABORT: C++-EXCEPTION\n (/tmp/atomspace-master/opencog/guile/SchemeEval.cc:1068)\nFunction args:\n((ImplicationLink (stv 0.9 0.9)\n (AndLink\n (TrueLink\n (ExecutionOutputLink\n (GroundedSchemaNode \"scm: ghost-execute-action\")\n (ListLink\n (WordNode \"I\")\n (WordNode \"have\")\n (WordNode \"no\")\n (WordNode \"idea\")\n )\n )\n (ExecutionOutputLink\n (GroundedSchemaNode \"scm: ghost-update-rule-strength\")\n (ListLink\n (ConceptNode \"OpenPsi: GHOST-rule-OKIOkZpKUPlUIsZJmVqDppVJBhQXEi6IMcMk\")\n (NumberNode \"0.000000\")\n )\n )\n (PutLink\n (StateLink\n (AnchorNode \"GHOST Current Topic\")\n (VariableNode \"$x\")\n )\n (ConceptNode \"GHOST Default Topic\")\n )\n )\n (SatisfactionLink\n (VariableList\n (TypedVariableLink\n (GlobNode \"wildcard-$YAzTs5vNgrXZYcOFOj1WscFO3z5nqDN9izIa\")\n (TypeSetLink\n (TypeNode \"WordNode\")\n (IntervalLink\n (NumberNode \"0.000000\")\n (NumberNode \"-1.000000\")\n )\n )\n )\n (TypedVariableLink\n (GlobNode \"wildcard-$Cs2csrdEtdCb43gZ2FduCVTM6qpL7xJszgrk\")\n (TypeSetLink\n (TypeNode \"WordNode\")\n (IntervalLink\n (NumberNode \"0.000000\")\n (NumberNode \"-1.000000\")\n )\n )\n )\n (TypedVariableLink\n (VariableNode \"why-$LW43RWwnrGg21eznrJwg2DTnQbt0VgBqg6Do\")\n (TypeNode \"WordNode\")\n )\n (TypedVariableLink\n (VariableNode \"why-$GN8E1Ac07fxE38JhpA1kgJjudK9QlJSqO6NG\")\n (TypeNode \"WordInstanceNode\")\n )\n (TypedVariableLink\n (GlobNode \"wildcard-$lhJGFpJHGYnQ0rALwhDuHSuB0dJVfhildHbt\")\n (TypeSetLink\n (TypeNode \"WordNode\")\n (IntervalLink\n (NumberNode \"0.000000\")\n (NumberNode \"-1.000000\")\n )\n )\n )\n (TypedVariableLink\n (GlobNode \"wildcard-$s6ojP6DK7P6DDNnY3eWlMZxxSlDpQJYFKijl\")\n (TypeSetLink\n (TypeNode \"WordNode\")\n (IntervalLink\n (NumberNode \"0.000000\")\n (NumberNode \"-1.000000\")\n )\n )\n )\n (TypedVariableLink\n (VariableNode \"$S\")\n (TypeNode \"SentenceNode\")\n )\n (TypedVariableLink\n (VariableNode \"$P\")\n (TypeNode \"ParseNode\")\n )\n )\n (AndLink\n (WordInstanceLink\n (VariableNode \"why-$GN8E1Ac07fxE38JhpA1kgJjudK9QlJSqO6NG\")\n (VariableNode \"$P\")\n )\n (ParseLink\n (VariableNode \"$P\")\n (VariableNode \"$S\")\n )\n (ReferenceLink\n (VariableNode \"why-$GN8E1Ac07fxE38JhpA1kgJjudK9QlJSqO6NG\")\n (VariableNode \"why-$LW43RWwnrGg21eznrJwg2DTnQbt0VgBqg6Do\")\n )\n (EvaluationLink\n (GroundedPredicateNode \"scm: ghost-lemma?\")\n (ListLink\n (VariableNode \"why-$LW43RWwnrGg21eznrJwg2DTnQbt0VgBqg6Do\")\n (WordNode \"why\" (av 2422.500000 2422.500000 0.000000))\n )\n )\n (EvaluationLink\n (PredicateNode \"GHOST Word Sequence\")\n (ListLink\n (VariableNode \"$S\")\n (ListLink\n (GlobNode \"wildcard-$YAzTs5vNgrXZYcOFOj1WscFO3z5nqDN9izIa\")\n (VariableNode \"why-$LW43RWwnrGg21eznrJwg2DTnQbt0VgBqg6Do\")\n (GlobNode \"wildcard-$lhJGFpJHGYnQ0rALwhDuHSuB0dJVfhildHbt\")\n )\n )\n )\n (EvaluationLink\n (PredicateNode \"GHOST Lemma Sequence\")\n (ListLink\n (VariableNode \"$S\")\n (ListLink\n (GlobNode \"wildcard-$Cs2csrdEtdCb43gZ2FduCVTM6qpL7xJszgrk\")\n (WordNode \"why\" (av 2422.500000 2422.500000 0.000000))\n (GlobNode \"wildcard-$s6ojP6DK7P6DDNnY3eWlMZxxSlDpQJYFKijl\")\n )\n )\n )\n (StateLink\n (AnchorNode \"GHOST Currently Processing\")\n (VariableNode \"$S\")\n )\n )\n )\n )\n (ConceptNode \"GHOST Default Goal\")\n)\n)")'.`What could possibly be causing it?