mayavi2 crashed with KeyError in _get_module()

Bug #211030 reported by sv3t
14
Affects Status Importance Assigned to Milestone
mayavi2 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: mayavi2

1) Description: Ubuntu hardy (development branch)
Release: 8.04

2) mayavi2:
  Installed: 2.0.2a1-4ubuntu2
  Candidate: 2.0.2a1-4ubuntu2
  Version table:
 *** 2.0.2a1-4ubuntu2 0
        500 http://archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status

The program crashes with the following error message when run:
Set Envisage to use the workbench UI: True
Set Envisage to use the workbench UI: True
Traceback (most recent call last):
  File "/usr/bin/mayavi2", line 4, in <module>
    mayavi2.main()
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/scripts/mayavi2.py", line 465, in main
    m.main(sys.argv[1:])
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/app.py", line 122, in main
    app.start()
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py", line 331, in start
    self.load_plugin_definitions(self.plugin_definitions)
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py", line 546, in load_plugin_definitions
    self.plugin_definition_loader.load(filenames)
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py", line 98, in load
    definitions.extend(self._get_plugin_definitions(module))
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py", line 272, in _get_plugin_definitions
    definitions = self._get_class_plugin_definitions(module)
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py", line 307, in _get_class_plugin_definitions
    definition = value()
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py", line 94, in __init__
    self._add_to_module()
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py", line 106, in _add_to_module
    module = self._get_module()
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py", line 153, in _get_module
    return sys.modules[module_name]
KeyError: 'envisage.core.plugin_definition_loader'

ProblemType: Crash
Architecture: i386
Date: Wed Apr 2 16:53:10 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/share/pyshared/enthought/mayavi/scripts/mayavi2
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: fglrx
Package: mayavi2 2.0.2a1-4ubuntu2
PackageArchitecture: i386
ProcCmdline: python /usr/bin/mayavi2
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/username/.local/bin
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/mayavi2']
SourcePackage: mayavi2
Title: mayavi2 crashed with KeyError in _get_module()
Uname: Linux 2.6.24-12-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev sambashare scanner video

Tags: apport-crash
Revision history for this message
sv3t (tassev) wrote :
Revision history for this message
sv3t (tassev) wrote :
Download full text (6.3 KiB)

> Can you try to access Mayavi functionnality throught ipython, for
> instance, run "ipython -wthread", and run the following commands:

> from enthought.mayavi import mlab
> mlab.test_contour3d()

> You should see a window poping up, with 3 isosurfaces. You should be able
> to rotate the view with the mouse. Going to fullscreen yields a crash
> with the version you have.

I managed to import mlab with In [1]: from enthought.mayavi.tools import mlab as suggested here http://gael-varoquaux.info/blog/?p=3
I get the following errors:

In [1]: from enthought.mayavi.tools import mlab
Set Envisage to use the workbench UI: True
Set Envisage to use the workbench UI: True

In [2]: mlab.test_contour3d()
---------------------------------------------------------------------------
<type 'exceptions.KeyError'> Traceback (most recent call last)

/home/svetlin/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/helper_functions.py in test_contour3d()
    358 scalars = x*x*0.5 + y*y + z*z*2.0
    359
--> 360 obj = contour3d(scalars, contours=4, transparent=True)
    361 return obj, scalars
    362

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/helper_functions.py in the_function(*args, **kwargs)
     28 def document_pipeline(pipeline):
     29 def the_function(*args, **kwargs):
---> 30 return pipeline(*args, **kwargs)
     31
     32 if hasattr(pipeline, 'doc'):

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/helper_functions.py in __call__(self, *args, **kwargs)
     59 the last object created by the pipeline."""
     60 self.store_kwargs(kwargs)
---> 61 self.source = self._source_function(*args, **kwargs)
     62 # Copy the pipeline so as not to modify it for the next call
     63 self.pipeline = self._pipeline[:]

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/sources.py in scalarfield(*args, **kwargs)
    240
    241 name = kwargs.pop('name', 'ScalarField')
--> 242 return tools._add_data(data_source, name)
    243
    244

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/tools.py in _add_data(tvtk_data, name)
     67 if len(name) > 0:
     68 d.name = name
---> 69 _make_default_figure().add_source(d)
     70 return d
     71

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/tools.py in _make_default_figure()
     42 application = get_application()
     43 if application is None:
---> 44 fig = figure()
     45 application = get_application()
     46 mayavi = application.get_service(IMAYAVI)

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/tools.py in figure()
    248 you! This returns the current running MayaVi script instance.
    249 """
--> 250 mayavi = get_mayavi()
    251 mayavi.new_scene()
    252 view(40, 50)

/usr/lib/python2.5/site-packages/enthought/mayavi/tools/tools.py in get_mayavi()
    240 return mayavi
    241 m = Mayavi()
--> 242 m.main()
    243 mayavi = m.script
    244 return mayavi

/usr/lib/python2.5/site-packages/enthought/mayavi/app.py in main(self, argv, pl...

Read more...

Revision history for this message
sv3t (tassev) wrote :

I updated the python enthought traits package, and mayavi2 works now.

Svetlin

Changed in mayavi2:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
Wojciech Aniszewski (pentahedron) wrote :

Mayavi2 still won't start, nothing happened... I see FBI editor instead of Maya, and finito.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 211030] Re: mayavi2 crashed with KeyError in _get_module()

On Sat, Apr 19, 2008 at 07:20:12PM -0000, Wojciech Aniszewski wrote:
> Mayavi2 still won't start, nothing happened... I see FBI editor instead
> of Maya, and finito.

Can you give us more information. In particular how you installed mayavi
(if you indeed did install it using the package, could you check the
version of your package). Can you also give us the traceback in FBI
(there is a tab called "traceback", you can copy and paste it in here).

Finally, can you please test mayavi without the interface. To do this,
you can run "ipython -wthread" (using the package "ipython"), and enter:

from enthought.mayavi import mlab
mlab.test_contour3d()

You should see a window poping up with a visualisation. If you don't,
could you please post the traceback here.

Cheers,

Gaël

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.