On 03/21/2013 03:45 PM, Angel Goñi Moreno wrote:
El jueves, 21 de marzo de 2013 14:52:57 UTC+1, Robert Cimrman escribió:
After installing everything, I run $ ./simple.py
examples/diffusion/poisson.py as the tutorial says. The file
cylinder.vtk is
created. Then I run ./postproc.py cylinder.vtk but when I do so I get
the
next error:
*traits.trait_errors.TraitError: The 'current_scene' trait of an Engine instance must be a Scene or None, but a value of <enthought.mayavi.core.scene.Scene object at 0xc6ff6b0> <class 'enthought.mayavi.core.scene.Scene'> was specified.*
Could you post the whole error message (if there is), so that we can see the line numbers?
/home/angel/Escritorio/PDE/etsproxy/enthought/__init__.py:7: DeprecationWarning: enthought namespace imports are deprecated DeprecationWarning) Traceback (most recent call last): File "./postproc.py", line 444, in <module> main() File "./postproc.py", line 437, in main view = view_file(filenames, filter_names, options) File "./postproc.py", line 250, in view_file domain_specific=options.domain_specific) File "/home/angel/Escritorio/PDEs/sfepy-master/sfepy/postprocess/viewer.py", line 837, in call_mlab self.engine.current_scene = self.scene File "/home/angel/Escritorio/PDE/traits/traits/trait_types.py", line 2724, in validate self.validate_failed( object, name, value ) File "/home/angel/Escritorio/PDE/traits/traits/trait_types.py", line 2555, in validate_failed self.error( object, name, value ) File "/home/angel/Escritorio/PDE/traits/traits/trait_handlers.py", line 170, in error value ) traits.trait_errors.TraitError: The 'current_scene' trait of an Engine instance must be a Scene or None, but a value of <enthought.mayavi.core.scene.Scene object at 0xa886cb0> <class 'enthought.mayavi.core.scene.Scene'> was specified.
Well, I do not really understand this error message - it says the trait has to be Scene, and complains that it is enthought.mayavi.core.scene.Scene, which has been exactly the same thing...
What is yout Mayavi version?
4.2.1
... in versions of mayavi <= 4.0.0. I cannot debug this easily, as I have the lastest packaged version and installing mayavi's stack manually has been rather painful. I guess you downgrading for the moment is equally inconvenient for you, right? Maybe you could ask the Enthought guys directly (enthou...@enthought.com) what changed between 4.0.0 and 4.2.1 in handling the current_scene' trait of an Engine.
I can run mayavi first and then load the file cylinder.vtk but it shows
the
cylinder all blue and not as in the tutorial online.
So you used the surface module to see something, right? The click on the file name and change "Point scalars name" from "node_groups" to "t" and you should see the temperature distribution. Does it help?
It works!!
Ok, something works at least!
r.