> 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
/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__'):
> Can you try to access Mayavi functionnality throught ipython, for
> instance, run "ipython -wthread", and run the following commands:
> from enthought.mayavi import mlab contour3d( )
> mlab.test_
> 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( ) ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- KeyError' > Traceback (most recent call last)
-------
<type 'exceptions.
/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) pipeline( pipeline) :
28 def document_
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) kwargs( kwargs) function( *args, **kwargs)
59 the last object created by the pipeline."""
60 self.store_
---> 61 self.source = self._source_
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) add_data( data_source, name)
240
241 name = kwargs.pop('name', 'ScalarField')
--> 242 return tools._
243
244
/usr/lib/ python2. 5/site- packages/ enthought/ mayavi/ tools/tools. py in _add_data( tvtk_data, name) figure( ).add_source( d)
67 if len(name) > 0:
68 d.name = name
---> 69 _make_default_
70 return d
71
/usr/lib/ python2. 5/site- packages/ enthought/ mayavi/ tools/tools. py in _make_default_ figure( ) get_service( IMAYAVI)
42 application = get_application()
43 if application is None:
---> 44 fig = figure()
45 application = get_application()
46 mayavi = application.
/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/applicatio n.py in start(self) plugin_ definitions( self.plugin_ definitions)
329
330 # Load all of the application's plugin definitions.
--> 331 self.load_
332
333 # Start all loaded plugins marked as 'autostart' along with any plugins
/usr/lib/ python2. 5/site- packages/ enthought/ envisage/ core/applicatio n.py in load_plugin_ definitions( self, filenames) definition_ loader. load(filenames)
544 """ Loads a list of plugin definitions. """
545
--> 546 self.plugin_
547
548 return
/usr/lib/ python2. 5/site- packages/ enthought/ envisage/ core/plugin_ definition_ loader. py in load(self, filenames) extend( self._get_ plugin_ definitions( module) )
96 definitions = []
97 for module in modules:
---> 98 definitions.
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) class_plugin_ definitions( module)
270 # *classes* that inherit from the 'PluginDefinition' class.
271 else:
--> 272 definitions = self._get_
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) to_module( )
92 #
93 # Add the plugin definition to the module it is defined in.
---> 94 self._add_
95
96 return
/usr/lib/ python2. 5/site- packages/ enthought/ envisage/ core/plugin_ definition. py in _add_to_ module( self) definitions_ _'):
104
105 # Get the module that the plugin definition is defined in.
--> 106 module = self._get_module()
107
108 if not hasattr(module, '__plugin_
/usr/lib/ python2. 5/site- packages/ enthought/ envisage/ core/plugin_ definition. py in _get_module(self) module_ name] ####### ####### ####### ####### ####### ####### ####### ####### #######
151 module_name = '__main__'
152
--> 153 return sys.modules[
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):
> +++++++ +++++++ ++++++ traits. api import HasTraits, Str
> from enthought.
> 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