Comment 2 for bug 211030

Revision history for this message
sv3t (tassev) wrote :

> 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, plugin_defs)
    120
    121 # Start the application.
--> 122 app.start()
    123
    124 # Start the GUI event loop. Usually this call does not return

/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py in start(self)
    329
    330 # Load all of the application's plugin definitions.
--> 331 self.load_plugin_definitions(self.plugin_definitions)
    332
    333 # Start all loaded plugins marked as 'autostart' along with any plugins

/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py in load_plugin_definitions(self, filenames)
    544 """ Loads a list of plugin definitions. """
    545
--> 546 self.plugin_definition_loader.load(filenames)
    547
    548 return

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py in load(self, filenames)
     96 definitions = []
     97 for module in modules:
---> 98 definitions.extend(self._get_plugin_definitions(module))
     99
    100 # Register the plugin definitions found in each module.

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py in _get_plugin_definitions(self, module)
    270 # *classes* that inherit from the 'PluginDefinition' class.
    271 else:
--> 272 definitions = self._get_class_plugin_definitions(module)
    273
    274 return definitions

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition_loader.py in _get_class_plugin_definitions(self, module)
    305 if issubclass(value, PluginDefinition):
    306 # Create a plugin definition *instance*.
--> 307 definition = value()
    308
    309 # For plugin definitions created as instances the location

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py in __init__(self, **traits)
     92 #
     93 # Add the plugin definition to the module it is defined in.
---> 94 self._add_to_module()
     95
     96 return

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py in _add_to_module(self)
    104
    105 # Get the module that the plugin definition is defined in.
--> 106 module = self._get_module()
    107
    108 if not hasattr(module, '__plugin_definitions__'):

/usr/lib/python2.5/site-packages/enthought/envisage/core/plugin_definition.py in _get_module(self)
    151 module_name = '__main__'
    152
--> 153 return sys.modules[module_name]
    154
    155 #### EOF ######################################################################

<type 'exceptions.KeyError'>: 'envisage.core.plugin_definition_loader'

> If this doesn't work, we'll try an even simpler test, can you run the
> following script (with the standard python):

> ++++++++++++++++++++
> from enthought.traits.api import HasTraits, Str

> class A(HasTraits):
> a = Str()

> A().configure_traits()
> ++++++++++++++++++++

> You should have a very simple dialog that pops up, with a text box to
> edit a string.

Yes, I got the dialog fine.

Svetlin