I have MOSES training results in scheme format that is I want to import to the atomspace. I am using the OpenCog python api to access the atomsapce and import the results, However, in trying to do I am getting
"Segmentation fault (core dumped)" error. To demonstrate what I am trying to do, here is a snippet of code I am using.
from opencog.scheme_wrapper import scheme_eval, scheme_eval_as
atomspace = scheme_eval_as('(cog-atomspace)')
with open('/path/to/the/result_file', 'r') as fp:
scm = fp.read()
response = scheme_eval(atomspace, scm) #this is line is the cause of the error.
When I instantiate the atomspace using its constructor, the above error does NOT happen. The problem in instantiating the atomspace through the constructor is that I cannot get response when I use the atomspace instance with the OpenCog REST API. What can be the cause this error? How can I resolve it?
P.S: I have attached the results file so that you can take a look at it.
Thanks in advance.