[Bug 329034] [NEW] When i type import visual in the python interpreter i get a RuntimeError

giannisfs giannisfs at gmail.com
Fri Feb 13 12:51:42 UTC 2009


Public bug reported:

I use Ubuntu 64-bit 8.10 
I have read http://www.ubuntu.com/community/reportproblem
and i am pretty sure i  can repeat the problem
and i have installed all the dependencies found in http://packages.ubuntu.com/intrepid/python-visual

i use Python version 2.5.2( from the ubuntu universe repositories)
so i installed what is necessary  to run vpython (or python-visual package as of ubuntu universe repositories) 

When i type  in the python interpreter:

>>> import visual

i get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/visual/__init__.py", line 15, in <module>
    import array_backend
  File "/usr/lib/python2.5/site-packages/visual/array_backend.py", line 50, in <module>
    raise RuntimeError, "Neither Numeric nor numarray could be found."
RuntimeError: Neither Numeric nor numarray could be found.


BUT when i type :

>>> import Numeric

i get no errors

also when i type:

>>> import numarray

i get no errors again...

So i have installed both Numeric  and numarray but the problems is at an
error checking

After some "further" research i discover that:
    in line 15 at file /usr/lib/python2.5/site-packages/visual/__init__.py 
    the array_backend has been imported as a module.  

so i opened the module  array _backend.py  which is  located at:
     /usr/lib/python2.5/site-packages/visual/array_backend.py

and i found in line 8 the function call :
     cvisual._init_numeric_impl()
and in line 16 :
    cvisual._init_numarray_impl()

Those function calls are both followed by a line with an  except  keyword handling no specific Error handler 
just  an empty except:

# see http://docs.python.org/reference/compound_stmts.html#except

So once again i typed what i found (in line 8 this time) in the python
interpreter:

>>> import cvisual
>>> cvisual._init_numeric_impl

and i got :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '_init_numeric_impl'

and  after typing the call  found in line 16 :

>>> cvisual._init_numarray_impl()

i got once more an AttributeError:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '_init_numarray_impl'


I suspect that the "bug"  is in the libraries under  /usr/lib/python2.5/site-packages/:
  
 cvisualmodule.so        cvisualmodule.so.1      cvisualmodule.so.1.0.0

Because pyhon raised Actually an Attribute error because didn't find the functions to call inside the modules 
or it just couldn't handle that call might means tha the modules were not compiled
as python expected . (That modules  as i have been informed are written in C language )

The bottom-line is that  assuming  the python-visual's cvisualmodule
couldn't work correctly with python the cvisualmodule  hasn't been
compiled correctly.


but i am not sure so that's way i submit the bug.
And i am very curious about what actually happened.

** Affects: python-visual (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: 3d cvisualmodule.so modules python vpython

-- 
When i type import visual in the python interpreter i get a RuntimeError
https://bugs.launchpad.net/bugs/329034
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list