Giter Club home page Giter Club logo

Comments (4)

certik avatar certik commented on July 2, 2024

Fix available in PR #73.

from mayavi.

certik avatar certik commented on July 2, 2024

The PR #73 fixes the build problem. However, when trying a simple mayavi script, I am getting some exceptions, presumably due to using VTK 6 below the hood:

In [3]: from mayavi import mlab
No handlers could be found for logger "traits.has_traits"

In [4]: mlab.options.offscreen = True

In [5]: mlab.test_contour3d()
---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/messenger.pyc in send(obj, event, *args, **kw_args)
    306 
    307 def send(obj, event, *args, **kw_args):
--> 308     _messenger.send(obj, event, *args, **kw_args)
    309 send.__doc__ = _messenger.send.__doc__
    310 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/messenger.pyc in send(self, source, event, *args, **kw_args)
    247                         inst = obj()
    248                         if inst:
--> 249                             getattr(inst, meth)(source, event, *args, **kw_args)
    250                         else:
    251                             # Oops, dead reference.

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/tvtk_base.pyc in update_traits(self, obj, event)
    454                     setattr(self, name, warn)
    455                 else:
--> 456                     setattr(self, name, val)
    457         # Reset the warning state.
    458         vtk.vtkObject.SetGlobalWarningDisplay(warn)

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/traits/mupe/lib/python2.7/site-packages/traits-4.3.0-py2.7-linux-x86_64.egg/traits/trait_handlers.pyc in error(self, object, name, value)
    167         """
    168         raise TraitError( object, name, self.full_info( object, name, value ),
--> 169                           value )
    170 
    171     def arg_error ( self, method, arg_num, object, name, value ):

TraitError: The 'alpha_bit_planes' trait of a RenderWindow instance must be 'f' or 'false' or 'n' or 'no' or 'off' or 'on' or 't' or 'true' or 'y' or 'yes' or 0 or 1, but a value of 8 <type 'int'> was specified.
---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
<ipython-input-5-ba825038dacc> in <module>()
----> 1 mlab.test_contour3d()

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/tools/helper_functions.pyc in test_contour3d()
    492     scalars = x * x * 0.5 + y * y + z * z * 2.0
    493 
--> 494     obj = contour3d(scalars, contours=4, transparent=True)
    495     return obj
    496 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/tools/helper_functions.pyc in the_function(*args, **kwargs)
     34 
     35     def the_function(*args, **kwargs):
---> 36         return pipeline(*args, **kwargs)
     37 
     38     if hasattr(pipeline, 'doc'):

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/tools/helper_functions.pyc in __call__(self, *args, **kwargs)
     74             scene = figure.scene
     75         else:
---> 76             scene = tools.gcf().scene
     77         if scene is not None:
     78             self._do_redraw = not scene.disable_render

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/tools/figure.pyc in gcf(engine)
    115     scene = engine.current_scene
    116     if scene is None:
--> 117         return figure(engine=engine)
    118     return scene
    119 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/tools/figure.pyc in figure(figure, bgcolor, fgcolor, engine, size)
     67             __scene_number_list.update((name,))
     68             name = 'Mayavi Scene %d' % name
---> 69             engine.new_scene(name=name, size=size)
     70             engine.current_scene.name = name
     71         else:

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/apptools/wm2g/lib/python2.7/site-packages/apptools-4.2.0-py2.7.egg/apptools/scripting/recordable.pyc in _wrapper(*args, **kw)
     43         if not record:
     44             # If the method was not recorded, just call it.
---> 45             result = func(*args, **kw)
     46 
     47         return result

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/core/engine.pyc in new_scene(self, viewer, name, **kwargs)
    432                     factory_kwargs[arg] = value
    433 
--> 434             viewer = self.scene_factory(**factory_kwargs)
    435             process_ui_events()
    436 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/mayavi/core/off_screen_engine.pyc in off_screen_viewer_factory(size)
     14 def off_screen_viewer_factory(size=(400, 350)):
     15     """A factory that creates an offscreen viewer."""
---> 16     win = TVTKWindow(off_screen_rendering=True)
     17     # Set all preferences.
     18     set_scene_preferences(win.scene)

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/tvtk_scene.pyc in __init__(self, **traits)
    917         """All the keyword arguments are passed on to the `TVTKScene`
    918         instance created."""
--> 919         self.scene = TVTKScene(**traits)

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/tvtk_scene.pyc in __init__(self, parent, **traits)
    199         self._def_pos = 1
    200 
--> 201         self.control = self._create_control(parent)
    202         self._renwin.update_traits()
    203 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/tvtk_scene.pyc in _create_control(self, parent)
    803         self._interactor.initialize()
    804         self._interactor.render()
--> 805         self.light_manager = light_manager.LightManager(self)
    806 
    807         if self.off_screen_rendering:

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/light_manager.pyc in __init__(self, renwin, **traits)
    349         self.lights = []
    350         for i in range(self.number_of_lights):
--> 351             light = CameraLight(self.renwin)
    352             self.lights.append(light)
    353 

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/light_manager.pyc in __init__(self, renwin, **traits)
    165     #################################################################
    166     def __init__(self, renwin, **traits):
--> 167         self.glyph = LightGlyph()
    168         super(CameraLight, self).__init__(**traits)
    169         self.source.light_type = 'camera_light'

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/mayavi/toug/lib/python2.7/site-packages/mayavi-4.3.0-py2.7-linux-x86_64.egg/tvtk/pyface/light_manager.pyc in __init__(self)
     57         t.rotate_y(90.0)
     58         t.translate((-2, 0, 0))
---> 59         tf.input = arrow.output
     60 
     61         mapper = tvtk.PolyDataMapper()

/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/traits/mupe/lib/python2.7/site-packages/traits-4.3.0-py2.7-linux-x86_64.egg/traits/trait_handlers.pyc in _read_only(object, name, value)
     99 def _read_only ( object, name, value ):
    100     raise TraitError, "The '%s' trait of %s instance is 'read only'." % (
--> 101                       name, class_of( object ) )
    102 
    103 def _undefined_get ( object, name ):

TraitError: The 'input' trait of a TransformFilter instance is 'read only'.

In [6]: 

Any ideas what is going on here?

from mayavi.

prabhuramachandran avatar prabhuramachandran commented on July 2, 2024

Thanks for the report. VTK 6 is incompatible with Mayavi as mayavi still uses the old SetInput/GetOutput methods which are no longer available. This will require a fair bit of work to fix. :(

from mayavi.

certik avatar certik commented on July 2, 2024

I see. The build issue is now fixed, and I have opened #74 for the SetInput/GetOutput problem.

from mayavi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.