The Schemewrapper Python module appears to be missing some files

40 views
Skip to first unread message

Johannes Castner

unread,
Apr 26, 2019, 6:05:46 AM4/26/19
to opencog
Dear group,

If you could help me with this bug, I'd be greatly appreciative.  I have a few scheme files, called `load_all.scm`, `math.scm`,  `statements.scm`, `collectiwise.scm` that I want to import while working with the python scheme wrapper.  Two months ago, this worked perfectly but now it seems, from the error message that I'm getting that some files are missing in that module?


Traceback (most recent call last):
  File "python/scheme_router.py", line 24, in <module>
    """)
  File "scheme_wrapper.pyx", line 44, in opencog.scheme_wrapper.scheme_eval
RuntimeError: Python-Scheme Wrapper: Failed to execute '
                        (load "load_all.scm")
                        (add-to-load-path "collectiwise")
                        (load "math.scm")
                        (load "statements.scm")
                        (load "collectiwise.scm")
                        '
Backtrace:
          19 (apply-smob/1 #<catch-closure 2d241e0>)
          18 (apply-smob/1 #<catch-closure 2d24060>)
In ice-9/boot-9.scm:
   2312:4 17 (save-module-excursion _)
In ice-9/eval-string.scm:
     38:6 16 (read-and-eval #<input: string 2d158c0> #:lang _)
In ice-9/boot-9.scm:
   2312:4 15 (save-module-excursion _)
  3832:10 14 (_)
   1693:5 13 (%start-stack load-stack _)
   1695:9 12 (_)
In unknown file:
          11 (primitive-load "/root/collectiwise/load_all.scm")
In ice-9/eval.scm:
   721:20 10 (primitive-eval (use-modules (ice-9 readline)))
In ice-9/psyntax.scm:
  1235:36  9 (expand-top-sequence ((use-modules (ice-9 readline))) _ \u2026)
  1182:24  8 (parse _ (("placeholder" placeholder)) ((top) #(# # \u2026)) \u2026)
   285:10  7 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) \u2026)
In ice-9/boot-9.scm:
  3377:20  6 (process-use-modules _)
   222:17  5 (map1 (((ice-9 readline))))
  3378:31  4 (_ ((ice-9 readline)))
   2803:6  3 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ \u2026)
In unknown file:
           2 (scm-error misc-error #f "~A ~S" ("no code for modu\u2026" \u2026) \u2026)
In ice-9/boot-9.scm:
   751:25  1 (dispatch-exception 0 misc-error (#f "~A ~S" ("no\u2026" \u2026) \u2026))
In unknown file:
           0 (apply-smob/1 #<catch-closure 2d24020> misc-error #f "\u2026" \u2026)

ERROR: In procedure apply-smob/1:
no code for module (ice-9 readline)
ABORT: misc-error
 (/root/atomspace/opencog/cython/opencog/PyScheme.cc:63)

Amirouche Boubekki

unread,
Apr 26, 2019, 6:13:09 PM4/26/19
to opencog
You don't have readline or guile-readline.

Which OS do you use? Which version of guile
 

Johannes Castner

unread,
Apr 27, 2019, 1:16:13 PM4/27/19
to opencog
Hi Amirouche, Oh thank you, I saw that some files seemed to be missing but I didn't know that it was the package guile-readline.  I'll try installing that now and I let you know asap.  The OS I'm using on this container is "cosmic" Ubuntu 8.10.  I'm using Docker so everything can be switched out easily and everything is exactly reproducible.  The point really is to have an opencog system and some code calling it running as a service as part of a bigger system.

Johannes 

Johannes Castner

unread,
Apr 27, 2019, 1:46:46 PM4/27/19
to opencog
It doesn't seem as though guile-readline can be installed separately; it seems to be assumed to come with guile? This is how I currently install guile (well, in a Docker way, where RUN, WORKDIR are used instead):

mkdir -p Sources
cd Sources
wget https://ftp.gnu.org/gnu/guile/guile-2.2.4.tar.xz
tar xvf guile-2.2.4.tar.xz
cd guile-2.2.4
./configure
make -j4
make install
cd ..

Is there something wrong or missing in this approach?

Johannes

On Friday, April 26, 2019 at 11:13:09 PM UTC+1, Amirouche Boubekki wrote:

Amirouche Boubekki

unread,
Apr 27, 2019, 1:54:09 PM4/27/19
to opencog
Le sam. 27 avr. 2019 à 19:46, Johannes Castner <jac...@gmail.com> a écrit :
It doesn't seem as though guile-readline can be installed separately; it seems to be assumed to come with guile? This is how I currently install guile (well, in a Docker way, where RUN, WORKDIR are used instead):

mkdir -p Sources
cd Sources
wget https://ftp.gnu.org/gnu/guile/guile-2.2.4.tar.xz
tar xvf guile-2.2.4.tar.xz
cd guile-2.2.4
./configure
make -j4
make install
cd ..

Check inside config.log you should see things like:

configure:54418: checking how to link with libreadline
configure:54891: result: -lreadline

config.log is generated by ./configure.

Maybe `libreadline-dev` is not installed?

Johannes Castner

unread,
Apr 27, 2019, 2:24:38 PM4/27/19
to opencog
now I also tried "apt-get install lib32readline-dev" and it still didn't work.  How can I make readline work?

On Friday, April 26, 2019 at 11:13:09 PM UTC+1, Amirouche Boubekki wrote:

Amirouche Boubekki

unread,
Apr 27, 2019, 2:25:49 PM4/27/19
to opencog
At this point I can not help anymore.

Maybe someone else will chime in.

--
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/0d20f99c-a9b4-4e5c-a768-c48fa5f4925b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johannes Castner

unread,
Apr 27, 2019, 2:26:10 PM4/27/19
to opencog
where is the config.log file, is it always in the same place? 

Johannes Castner

unread,
Apr 27, 2019, 2:30:50 PM4/27/19
to opencog
Hi Amirouche,

Actually, I found the config.log file and here's the contents:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU Guile configure 2.2.4, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = 7c48b75d01ec
uname -m = x86_64
uname -r = 4.15.0-47-generic
uname -s = Linux
uname -v = #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:4147: checking for a BSD-compatible install
configure:4215: result: /usr/bin/install -c
configure:4226: checking whether build environment is sane
configure:4281: result: yes
configure:4432: checking for a thread-safe mkdir -p
configure:4471: result: /bin/mkdir -p
configure:4478: checking for gawk
configure:4508: result: no
configure:4478: checking for mawk
configure:4494: found /usr/bin/mawk
configure:4505: result: mawk
                                                                                                                                                                                          1,1           Top

To unsubscribe from this group and stop receiving emails from it, send an email to ope...@googlegroups.com.

Linas Vepstas

unread,
Apr 27, 2019, 4:34:59 PM4/27/19
to opencog
On Sat, Apr 27, 2019 at 1:24 PM Johannes Castner <jac...@gmail.com> wrote:
now I also tried "apt-get install lib32readline-dev" and it still didn't work.  How can I make readline work?

Why not lib64readline-dev or better yet, plain-old libreadline-dev? Are you trying to make opencog run in a 32-bit system?

Did you remember to reconfigure, recompile and reinstall guile afterwards?  Get rid of the configure cache first --- otherwise, configure will simply remember that last time, it did not find readline; it is not going to check a second time. You have to remove the cache to make it check again.

-- linas
 
--
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/0d20f99c-a9b4-4e5c-a768-c48fa5f4925b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
cassette tapes - analog TV - film cameras - you

Johannes Castner

unread,
May 3, 2019, 4:14:34 PM5/3/19
to ope...@googlegroups.com
Thank you, this issue has been resolved and I’d like to thank Nil for helping me work out things on Slack.  So now there exists a fully running and functional Dockerfile and Docker image and maybe this could be useful for others?  I’ve noticed that many of the available Docker images aren’t running correctly and are no longer supported.  With the help of Nil I have now arrived at a well running system that has Python3 and Scheme interfaces running and where scheme functions can be run from python3.  I’m currently using this image to build some other things on top of it, some of that might also be of use to some people.  

Thank you!  


For more options, visit https://groups.google.com/d/optout.
--
Johannes

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

- Albert Einstein
Reply all
Reply to author
Forward
0 new messages