Skip to content

Error when running example program #6

@padawanphysicist

Description

@padawanphysicist

Hi,

Thanks for developing this module!

I'm currently using the following setup:

Linux 5.10.76-gentoo-r1-x86_64 #1 SMP Mon Nov 22 10:44:28 -03 2021
guile (GNU Guile) 3.0.7.15-d79a2
Python 3.9.8

When running the script within the README I've got this error:

Backtrace:
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           6 (apply-smob/0 #<thunk 7f870f7c6d00>)
In ice-9/boot-9.scm:
    724:2  5 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7f870f7c1c80>)))
In ice-9/boot-9.scm:
   2836:4  3 (save-module-excursion _)
  4388:12  2 (_)
In python/eval.scm:
      9:2  1 (_)
In python/core/type.scm:
    107:5  0 (python->scm _)

python/core/type.scm:107:5: In procedure python->scm:
An exception of <class 'ImportError'> reported by python:
/usr/lib/python3.9/lib-dynload/math.cpython-39-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type

I've checked that the some modules (like math or numpy, which I have installed) imported by python-import-module return a NULL pointer:

scheme@(guile-user)> (use-modules (python core libpython))
scheme@(guile-user)> (use-modules (python core type))
scheme@(guile-user)> (use-modules (python eval))
scheme@(guile-user)> (python-initialize)
scheme@(guile-user)> (python-initialized?)
$1 = #t
scheme@(guile-user)> (python-import-module "os")
$2 = #<pointer 0x7fa8b62eef40>
scheme@(guile-user)> (python-import-module "sys")
$3 = #<pointer 0x7fa8b633d7c0>
scheme@(guile-user)> (python-import-module "math")
$4 = #<pointer 0x0>
scheme@(guile-user)> (python-import-module "numpy")
$5 = #<pointer 0x0>
scheme@(guile-user)>

Can someone give me some light to understand what's happening here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions