Public bug reported:

Normally, you can press 'f' while focused on a mayavi window and then
click to change the focus point (the point about which rotations occur).
However, when I do that in my version (see attached data added by
ubuntu-bug), I get an uncaught exception:

ipython -wthread

In [1]: from mayavi import mlab
In [2]: mlab.figure(bgcolor=(0.5,0.5,0.5))
In [3]: mlab.points3d(0,0,0,color=(1,0,0))
In [4]: 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/usr/lib/python2.7/dist-packages/tvtk/pyface/ui/wx/scene.pyc in OnKeyUp(self, 
event)
    482                         x = event.GetX()
    483                         y = self._vtk_control.GetSize()[1] - 
event.GetY()
--> 484                     data = self.picker.pick_world(x, y)
    485                     coord = data.coordinate
    486                     if coord is not None:

/usr/lib/python2.7/dist-packages/tvtk/pyface/picker.pyc in pick_world(self, x, 
y)
    376 
    377         # Use the cell picker to get the data that needs to be probed.

--> 378         self.cellpicker.pick( (float(x), float(y), 0.0), 
self.renwin.renderer)
    379 
    380         wp = self.worldpicker

/usr/lib/python2.7/dist-packages/tvtk/tvtk_classes.zip/tvtk_classes/abstract_picker.py
 in pick(self, *args)
    151         """
    152         my_args = [deref_vtk(x) for x in args]
--> 153         ret = self._wrap_call(self._vtk_obj.Pick, *my_args)
    154         return ret
    155 

/usr/lib/python2.7/dist-packages/tvtk/tvtk_base.pyc in _wrap_call(self, 
vtk_method, *args)
    521         self._in_set += 1
    522         mtime = self._wrapped_mtime(vtk_obj) + 1
--> 523         ret = vtk_method(*args)
    524         self._in_set -= 1
    525         if self._wrapped_mtime(vtk_obj) > mtime:

TypeError: function takes exactly 4 arguments (2 given)


The function wrapped here was given a tuple containing the click coordinates, 
but expected three individual coordinates.  

See /usr/share/pyshared/tvtk/pyface/picker.py.  The first few lines of
the pick_world functon:

        self.worldpicker.pick((float(x), float(y), 0.0),
self.renwin.renderer)

        # Use the cell picker to get the data that needs to be probed.
        self.cellpicker.pick( (float(x), float(y), 0.0), self.renwin.renderer)


If I remove the parentheses, converting the first tuple into a set of
three args in the first two lines of that function:

        self.worldpicker.pick(float(x), float(y), 0.0,
self.renwin.renderer)

        # Use the cell picker to get the data that needs to be probed.
        self.cellpicker.pick( float(x), float(y), 0.0, self.renwin.renderer)

this problem goes away.

Could this possibly be due to some sort of version mismatch between
components (tvtk and mayavi for example)?  Or is this just an isolated
bug.  I don't know.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: mayavi2 4.0.0-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic-pae 3.0.13
Uname: Linux 3.0.0-15-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Mon Feb  6 10:12:55 2012
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mayavi2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: mayavi2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/927748

Title:
  'f' key (focus shift) causes exception when using mayavi2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mayavi2/+bug/927748/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to