Skip to content
New issue

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

GHOST throwing exception on topics after clearing the atomspace #3312

Open
Habush opened this issue Oct 1, 2018 · 1 comment
Open

GHOST throwing exception on topics after clearing the atomspace #3312

Habush opened this issue Oct 1, 2018 · 1 comment
Labels

Comments

@Habush
Copy link

Habush commented Oct 1, 2018

Let's we have a file containing the following simple ghost topic:

topic: ~introductions keep[]
u: ([hello hi hey] {there}) ^intro()

After opening a guile shell and importing the necessary OpenCog modules, I run the following commands:

scheme@(guile-user) > (ghost-parse-file "chatrules.top")
scheme@(guile-user) > (clear) 

If I try to run ghost-parse-file after clearing the atomspace, then I get the following error:

In ghost.scm:
258:2 4 (ghost-parse-file )
In system/base/lalr.upstream.scm:
1956:16 3 (
_ )
In opencog/ghost/cs-parse.scm:
290:8 2 (
#(0 #t 25 #<lexical-token category: TOPIC source: #<source-location input: "/root/ghost/chatru…> …) …)
In opencog/ghost/translator.scm:
810:2 1 (create-topic _ _ _)
In unknown file:
0 (cog-set-value! (ConceptNode "GHOST introductions")
# #)

This means loading ghost rules that have topics will work fine but it will raise the above exception if we reload the same rules after clearing the atomspace.

What is the cause of this issue? And how can I fix it.

@amebel
Copy link
Contributor

amebel commented Oct 2, 2018

Don't use (clear), OpenPsi doesn't work well with it. Just restart the cogserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants