opencog / opencog

A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)

Home Page:http://wiki.opencog.org/w/Development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unbound Variable: TypeSet

mindpixel20 opened this issue · comments

After installing and bringing up all requirements for ghost, I am unable to parse the examle:

`guile> (ghost-parse "r: (she ate apple) me too")
Backtrace:
13 (apply-smob/1 #<catch-closure 7f842983a0c0>)
12 (apply-smob/1 #<catch-closure 7f842a751fc0>)
In ice-9/boot-9.scm:
2312:4 11 (save-module-excursion #<procedure 7f842984e3a0 at ice-…>)
In ice-9/eval-string.scm:
38:6 10 (read-and-eval #<input: string 7f8428e2c540> #:lang )
In opencog/ghost/translator.scm:
720:2 9 (process-rule-stack)
In srfi/srfi-1.scm:
640:9 8 (for-each #<procedure 7f84092e43e0 at opencog/ghost/tr…> …)
In opencog/ghost/translator.scm:
823:21 7 (instantiate-rule _ _ (("novelty" . 0.24)) (("no…" . #)) …)
360:16 6 (process-pattern-terms ((wildcard 0 . -1) (lemma . #) …))
186:4 5 (process ((wildcard 0 . -1) (lemma . "eat") (# . "a…") …))
In srfi/srfi-1.scm:
640:9 4 (for-each #<procedure 7f8429fa77d0 at opencog/ghost/tr…> …)
In opencog/ghost/translator.scm:
284:27 3 (
(wildcard 0 . -1))
In opencog/ghost/terms.scm:
212:12 2 (wildcard 0 -1)
In ice-9/boot-9.scm:
751:25 1 (dispatch-exception 0 unbound-variable ("module-look…" …))
In unknown file:
0 (apply-smob/1 #<catch-closure 7f842a751f80> # "module-…" …)

ERROR: In procedure apply-smob/1:
In procedure module-lookup: Unbound variable: TypeSet
ABORT: unbound-variable`

Please make sure that you pulled the latest version of the atomspace. The TypeSet link was introduced maybe a year ago; is it possible that you atomspace code is older than that?

It would be best to start clean, with fresh pulls, builds and installs of all the other dependencies as well, starting with cogutils, as some changes may require rebuilding the dependent packages...

I've pulled, rebuilt, and reinstalled all modules, still facing the same issue as before.

When you start everything, it should spew a bunch of messages, such as

compiled /home/linas/.cache/guile/ccache/3.0-LE-8-4.4/usr/local/share/guile/site/3.0/opencog/ghost/translator.scm.go

and similar. Could you remove the entire directory /home/mindpixel20/.cache/guile/ccache/ and run the example again?

Another sanity check: what happens if you just say (TypeSet) all by itself at the guile prompt? How about (TypeIntersectionLink) ?

Can you view /usr/local/share/guile/site/3.0/opencog.scm and verify that it looks like the one here: https://github.com/opencog/atomspace/blob/master/opencog/scm/opencog.scm paying special attention to line 125 where TypeSet is defined? If it doesn't look like this file, then you have some older version for some reason. If you installed the newest version, then there might still be some older version hanging out somewhere else in the file system, interfering with things.

There is also one more possibility: some other module forgot to load the opencog module. If this is the case, then saying (use-modules (opencog)) before loading other things. There also appears to be a different ghost bug, in that you may need to say (use-modules (opencog nlp)) before you say (use-modules (opencog ghost)).

Which example are you trying to run?

@amebel can you look at this? When I try to run this:

(use-modules (opencog) (opencog ghost))
(ghost-parse "r: (she ate apple) me too")

then I get an error:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: ReferenceLink

This error goes away if I say (use-modules (opencog nlp)) -- it seems like ghost or something forgets to load this module.

Closing; I assume this issue resolved itself.