I tried using your example and still getting the same error. For clarity
here is what I tried to run in python:
from opencog.scheme_wrapper import scheme_eval, scheme_eval_as
atomspace = scheme_eval_as('(cog-atomspace)')
with open('foo.scm', 'r') as fp:
scm = fp.read()
response = scheme_eval(atomspace, scm) #Segfault occurs here
And also, I will post an issue on the OpenCog repo.
On Wednesday, January 3, 2018 at 7:00:26 AM UTC+3, linas wrote:
>
> Is this still an issue?
>
> I just tried it; using "foo.scm" which contained:
>
> (use-modules (opencog))
>
> (Concept "foobar")
>
> (display "ollllaaa\n")
>
> (Concept "barfoo")
>
>
> I got no error, and this output:
>
> >>> response = scheme_eval(atomspace, scm)
> >>> print response
> ollllaaa
> #<Invalid handle>
>
>
> You probably should open a github issue to track this.
>
> --linas
>
>
> On Thu, Dec 28, 2017 at 10:59 AM, Xabush Semrie <[email protected]
> <javascript:>> wrote:
>
>> 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.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "opencog" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/opencog.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/opencog/54b110a1-29bf-477a-a56d-cf5362b4c026%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/opencog/54b110a1-29bf-477a-a56d-cf5362b4c026%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *"The problem is not that artificial intelligence will get too smart and
> take over the world," computer scientist Pedro Domingos writes, "the
> problem is that it's too stupid and already has." *
>
--
You received this message because you are subscribed to the Google Groups
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/439d805a-6eef-4e94-974d-d0d9ad36e425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.