Python code and Scheme code don’t work anymore

35 views
Skip to first unread message

Johannes Castner

unread,
Apr 16, 2019, 4:35:05 AM4/16/19
to opencog
Dear all,

A couple of months back I’ve spent some significant time working on Python and Scheme code that imported the opencog system and the AtomSpace and then imported, merged and reasoned on a collection of ontologies in various formats (owl, obo and JSON-LD) all in anticipation of then running the pattern-miner to discover important questions that aren’t explicitly answered in any of those ontologies. I did all of that in order to complete my dissertation and I have to urgently now make all of this code work; but for some reason, as one bug was fixed, all of my code subsequently stopped working and we (I’m working with a friend as we’re seeking to use all of this code in a bigger project) and we were unable until now to make it work! Here’s my repo that I need to make work; it’s a bunch of Python and scheme code I’ve written against the Opencog API:

https://github.com/CollectiWise/collectiwise

In particular, I’m trying to run this file (which imports some of the others):

https://github.com/CollectiWise/collectiwise/blob/master/python/scheme_router.py

please someone help us to get it running again; I’m desperate as this code is necessary for 1) a product we’re trying to get to market and 2) my last paper for my dissertation that I need to defend in two months.

Nil Geisweiller

unread,
Apr 16, 2019, 5:09:28 AM4/16/19
to ope...@googlegroups.com
Hi Johannes,

what is the nature of the problem? It doesn't behave as it is supposed
to? Or you're getting an error? If so could you paste it?

I tried to run

scheme_router.py

I'm getting the follow error attached.

Nil
scheme_router.stdout

Johannes Castner

unread,
Apr 16, 2019, 9:20:58 AM4/16/19
to opencog
Hi Nil, it’s still that error where my Python3 code cannot import anything from opencog. The import statements fail. I think I’ve mentioned this before; we’re just seriously stuck there. Also Austin Agbo has posted about it towards the end of this thread:

https://groups.google.com/forum/m/#!topic/opencog/82AylgobEnE

Austin also had emailed Linas about it and I think that Linas mentioned that the Python3 API isn’t supported anymore; is that right? Because that would be quite disastrous for me personally right now since I’ve put a lot on the line based on this particular code base. Before you fixed that one bug that couldn’t be stopped by any try and except clauses (about two months back) everything was running; well and then came that bug. After you fixed that bug we could never get the system to work again. I’m not sure what happened?

Please let me know what I can try or do to get this system into a stable state, against which I can write new python and scheme code and so that it allows me to run all of the code that I’ve already built!

Hope you’re well,

Johannes

Nil Geisweiller

unread,
Apr 16, 2019, 12:06:08 PM4/16/19
to ope...@googlegroups.com, Johannes Castner
Johannes,

maybe best do that interactively, can you access opencog slack

https://wiki.opencog.org/w/The_Open_Cognition_Project#Participate

?

Nil

Johannes Castner

unread,
Apr 16, 2019, 12:26:45 PM4/16/19
to Nil Geisweiller, ope...@googlegroups.com
Yes, I can. I'm on. What is your name there?

johannes
--
Johannes

--------------------------------------------------------------------------------------------------------
"Peace cannot be kept by force; it can only be achieved by understanding."

- Albert Einstein

Vitaly Bogdanov

unread,
Apr 16, 2019, 12:42:19 PM4/16/19
to opencog, Nil Geisweiller
Johannes,

You can write to 'general' channel.

Also I have couple of comments on your question. First, opencog Python3 API is still supported :-) For me personally two frequent issues with import are:
1) you don't have python libraries in PYTHONPATH; the reason is that OpenCog gets installation path from Python itself and old Python versions surprisingly returns the path which is not by default included into PYTHONPATH. So you need to add it to the PYTHONPATH manually.
2) if you have quite complex Python environment: like few versions installed simultaneously it can be the case that OpenCog is compiled using python 3.5 and you are trying to load it using Python 3.6. In such case you will see error like "this library is compiled for version 3.5 and you are trying to load it using 3.6"

Best regards,
  Vitaly

вт, 16 апр. 2019 г. в 19:26, Johannes Castner <jac...@gmail.com>:
--
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 opencog+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
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/CABZZiP%2BPRuR8n-8UOXgOKwUjYyXDFZuuiiV6scAwz8COMuzvug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vitaly Bogdanov

unread,
Apr 16, 2019, 12:44:47 PM4/16/19
to opencog, Nil Geisweiller
OpenCog issue for the first problem https://github.com/opencog/atomspace/issues/1782

вт, 16 апр. 2019 г. в 19:44, Vitaly Bogdanov <vsb...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages