mayavi2 willnot run

Bug #241352 reported by Joe Kilner
6
Affects Status Importance Assigned to Milestone
enthought-traits-ui (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mayavi2

System:

Description: Ubuntu 8.04.1
Release: 8.04
MayaVi 2.0.2a1

Steps to reproduce:

1) Install mayavi2 from synaptic
2) Run mayavi2 from a terminal
3) FBI pops up with the following:

Traceback:

  File "/usr/lib/python2.5/site-packages/enthought/traits/trait_notifiers.py", line 428, in rebind_call_1
    self.dispatch( getattr( self.object(), self.name ), new )
  File "/usr/lib/python2.5/site-packages/enthought/traits/trait_notifiers.py", line 373, in dispatch
    handler( *args )
  File "/usr/lib/python2.5/site-packages/enthought/mayavi/app.py", line 173, in _start
    self.script = app.get_service(IMAYAVI)
  File "/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py", line 654, in get_service
    raise SystemError("Service %s not found" % str(interface))
Exception: Service enthought.mayavi.IMayaVi not found

TEST CASE:
1) Install python-wxgtk2.8.
2) Run mayavi2 from a terminal.

RESULT ON PASS:
- Mayavi2 runs fine.

RESULT ON FAIL:
- Mayavi2 doesn't start, and FBI (Frame Based Inspector) starts instead.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 241352] [NEW] mayavi2 willnot run

Hi,

The traceback you are getting is actually not where the exception was
generated, as lazy loading hide the real error. Mayavi does run on some
boxes, and I can't reproduce your problems, so we need to find out what
is wrong. Can you please remove the file
~/.enthought/enthought.mayavi/ets.log , launch mayavi2 once, to get that
error message, and then send us the above log file.

Cheers,

Gaël

On Thu, Jun 19, 2008 at 03:56:08PM -0000, Joe Kilner wrote:
> Public bug reported:

> Binary package hint: mayavi2

> System:

> Description: Ubuntu 8.04.1
> Release: 8.04
> MayaVi 2.0.2a1

> Steps to reproduce:

> 1) Install mayavi2 from synaptic
> 2) Run mayavi2 from a terminal
> 3) FBI pops up with the following:

> Traceback:

> File "/usr/lib/python2.5/site-packages/enthought/traits/trait_notifiers.py", line 428, in rebind_call_1
> self.dispatch( getattr( self.object(), self.name ), new )
> File "/usr/lib/python2.5/site-packages/enthought/traits/trait_notifiers.py", line 373, in dispatch
> handler( *args )
> File "/usr/lib/python2.5/site-packages/enthought/mayavi/app.py", line 173, in _start
> self.script = app.get_service(IMAYAVI)
> File "/usr/lib/python2.5/site-packages/enthought/envisage/core/application.py", line 654, in get_service
> raise SystemError("Service %s not found" % str(interface))
> Exception: Service enthought.mayavi.IMayaVi not found

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

Revision history for this message
Andrea Colangelo (warp10) wrote :

Joe, thank you for taking the time to report this bug and helping to make Ubuntu better.

I am unable to reproduce this bug under Ubuntu 8.04 with the latest packages available from repositories. Mayavi2 starts fine here.

Please, Joe, could you give more information about your hardware? are you running mayavi2 on a 32- or 64-bit machine? Further, would you check that you have mayavi 2.0.2a1-4ubuntu2 installed?

Marking this bug as Incomplete.

Changed in mayavi2:
assignee: nobody → joekilner
status: New → Incomplete
Revision history for this message
Hayden Callow (hayden-callow) wrote :

Is mayavi2 ok with wx2.8?

>>> import wx
>>> wx.version()
 '2.8.7.1 (gtk2-unicode)'

mayavi2 2>stderr.log
cat stderr.log

/var/lib/python-support/python2.5/vtk/wx/wxVTKRenderWindow.py:79: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible.
  from wxPython.wx import *

ETS log mentioned above attached

Removing wx2.8 (with wx2.6 installed in parallel) appears to give working mayavi2

>>> import wx
>>> wx.__version__
'2.6.3.2'

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 241352] Re: mayavi2 willnot run

On Thu, Jun 19, 2008 at 09:03:32PM -0000, Hayden Callow wrote:
> Is mayavi2 ok with wx2.8?

Should be.

> ETS log mentioned above attached

> Removing wx2.8 (with wx2.6 installed in parallel) appears to give
> working mayavi2

OK, that's an interesting piece of information.
It seems to be in the python-vtk, as the following line fails:

from vtk.wx.wxVTKRenderWindow import wxVTKRenderWindow

Actually, know that you point it out, this is a know issue. The
wxVTKRenderWindow is depreciated, and does not work with wxpython2.8. The
solution is to use a different RenderWindow, and we switched to that in
newer versions of Mayavi2. There will soon be a new release of mayavi,
and we are planning to push it into hardy-backports. In the mean time you
can get some package that (I believe) do not display this bug on my PPA
(they are a slightly newer version of Mayavi2).

We have a few problems with VTK 5.3 that we want to fix with Mayavi2? and
after that we do a new release. Hopefully in a week. Give another week
for the Debian packages to follow, and the MOTUs to sync with Debian, and
backport, and you should have a nice and shiny new version of Mayavi2,
with this fix, and other ones.

Cheers,

Gaël

Revision history for this message
Andrea Colangelo (warp10) wrote :

Gael, since not everyone enable -backport repositories, this bug could be worth a SRU for hardy. When the new mayavi2 is out, it would be great if you can isolate the patch for this bug, so that we can try the SRU road along with the hardy-backport one.

I'll keep this bug marked as incomplete: if other people can provide more informations about this bug, please report your tests here.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Thu, Jun 19, 2008 at 10:12:29PM -0000, Andrea Colangelo wrote:
> Gael, since not everyone enable -backport repositories, this bug could
> be worth a SRU for hardy. When the new mayavi2 is out, it would be great
> if you can isolate the patch for this bug, so that we can try the SRU
> road along with the hardy-backport one.

What's SRU?

I can make a special patch, it is just going to take me precious time,
that I would much rather spend elsewhere, especially since the release
I'd be patching for is quite old (around Christams, I think) and has
quite a few other bugs that where fixed.

Gaël

Revision history for this message
Joe Kilner (joekilner) wrote :

You want me to provide more information? I am disappointed, don't you guys have a crystal ball or something? ;)

My system is a Dell D830 running 64bit ubuntu with 2Gb ram. Synaptic reports the package version as 2.0.2a1-4ubuntu2 and "mayavi -V" gives "MayaVi 2.0.2a1". I have a bunch of python stuff in ~/lib/python2.5 and have previously installed mayavi2 there, but I cleaned everything out. I also have the PYTHONPATH variable set, but have tried running with it unset and get the same results.

The log file requested is attached.

Hope that helps, let me know if I can be of any more assistance! I am a developer (though relatively new to Python) so am happy to try a bit of debugging if I can get a few pointers as to where to look.

    Joe

Revision history for this message
Joe Kilner (joekilner) wrote :

After reading the rest of the thread, I removed wxgtk2.8 and mayavi2 runs fine now.

I'll try reinstalling it when the backport goes out.

Thanks,

    Joe

Revision history for this message
Scott Kitterman (kitterman) wrote :

Responding to Gaël:

SRU is Stable Release Update. Once a version of Ubuntu is released, we virtually never put a new version into it. So to fix Hardy, we'd need a minimally invasive patch to fix this issue that could be added to the current Hardy version. If someone can come up with the patch, there are a number of developers that could package the fix to get it into Hardy.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Fri, Jun 20, 2008 at 02:50:13AM -0000, Joe Kilner wrote:
> After reading the rest of the thread, I removed wxgtk2.8 and mayavi2
> runs fine now.

> I'll try reinstalling it when the backport goes out.

OK, thanks.

I am browsing through Trac history to see if I can isolate the change
that fixed that, but the problem is that it is quite old, we'll see.

Gaël

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Fri, Jun 20, 2008 at 02:59:03AM -0000, Scott Kitterman wrote:
> Responding to Gaël:

> SRU is Stable Release Update. Once a version of Ubuntu is released, we
> virtually never put a new version into it. So to fix Hardy, we'd need a
> minimally invasive patch to fix this issue that could be added to the
> current Hardy version. If someone can come up with the patch, there are
> a number of developers that could package the fix to get it into Hardy.

Looking into it right now. I seem to remember the modification is very
small, but I can't find it in the svn history. We'll see if I can find
it.

Gaël

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Fri, Jun 20, 2008 at 03:06:52AM -0000, Gaël Varoquaux wrote:
> On Fri, Jun 20, 2008 at 02:59:03AM -0000, Scott Kitterman wrote:
> > Responding to Gaël:

> > SRU is Stable Release Update. Once a version of Ubuntu is released, we
> > virtually never put a new version into it. So to fix Hardy, we'd need a
> > minimally invasive patch to fix this issue that could be added to the
> > current Hardy version. If someone can come up with the patch, there are
> > a number of developers that could package the fix to get it into Hardy.

> Looking into it right now. I seem to remember the modification is very
> small, but I can't find it in the svn history. We'll see if I can find
> it.

OK, it took me pretty much one hour to figure out that the change that
fixed this problem is the following one liner: in package
python-enthought-traits-ui, in file enthought/pyface/tvtk/api.py, remove
the second line, ie "from simple_scene import SimpleScene".

One my box (ubuntu hardy) this fixes the problem. Can somebody confirm it
does for him.

Hopefully this means we can call this bug fixed, right?

Gaël

Revision history for this message
Scott Kitterman (kitterman) wrote :

So this is a bug in python-enthought-traits-ui? Before we could change that, we'd need to understand the impacts of that on that package and other users of SimpleScene.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Fri, Jun 20, 2008 at 05:28:59AM -0000, Scott Kitterman wrote:
> So this is a bug in python-enthought-traits-ui? Before we could change
> that, we'd need to understand the impacts of that on that package and
> other users of SimpleScene.

It is. This code that is in python-enthought-traits-ui should really be
moved to mayavi2. The whole ethnought.pyface.tvtk should be moved to
enthought.tvtk.pyface (whcch lives in the mayavi2 Debian package). This
is historical, because at some point we where considering these projects
as non independant. These 2 projects are a split of the same SVN for
modularity: the python-matplotlib project (to which we are not directly
related) uses the python-enthought-traits project. The
python-enthought-traits-ui project is the ui part of the
python-enthought-traits project. It is not currently used by another
Debian package, but it is used in other projects, who do not use the 3D
plotting code in mayavi2. Thus they do not want the dependency on vtk,
which is a heavy dependency. We will probably need to split the Debian
packages a bit more, as time goes on, as this code is very modular, and
there are usecases for its modularity.

As the python-vtk project as declared wxVTKRenderWindow obsolete and
unmainained, we have declared the SimpleScene obsolete and have removed
in from the api. It is still in the codebase, and can be imported
directly from its source file, but this will cause a traceback when used
with wxpython2.8.

When we did this, we surveyed our users, and the SimpleScene was not used
anywhere. People use the Scene, and so did we in mayavi.

So as a conclusion, this is an API breakage, but to react to a wxPython
API breakage, and the packages python-enthought-traits,
python-enthought-traits-ui and mayavi2 are stronly linked.

I hope the clarifies a bit things.

Cheers,

Gaël

Revision history for this message
Andrea Colangelo (warp10) wrote :

The bug has been confirmed by an upstream developer. Reassigning to enthought-traits-ui and marking as confirmed.

Changed in mayavi2:
assignee: joekilner → nobody
status: Incomplete → Confirmed
Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

Here is a patch that should solve the problem. It does on my box. Please test it and confirm it solves the problem. You should be able to release a fixed package and close the bug.
Thanks to Andrea Colangelo for helping me get an acceptable patch out.

Changed in enthought-traits-ui:
importance: Undecided → Medium
Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

Here is another patch that explicitly states that the SimpleScene example will not run with Wx 2.8 and higher.

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

Do need consider above patch, it was the wrong file. Here is the correct file.

Changed in enthought-traits-ui:
assignee: nobody → warp10
status: Confirmed → In Progress
Revision history for this message
Andrea Colangelo (warp10) wrote :

This debdiff is based on Gael's patch, it builds, installs and runs fine on my box.

This fix is already present in the current release of enthought-traits-ui in intrepid. The need for a SRU is pretty clear, since mayavi2 doesn't start at all when python-wxgtk2.8 is installed, and regression risk should be very low.

A (very easy) test case has been added in the bug description. Subscribing motu-sru for the SRU ack.

description: updated
Changed in enthought-traits-ui:
assignee: warp10 → nobody
status: In Progress → Confirmed
description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 241352] [NEW] mayavi2 willnot run

Ack from motu-sru.

Revision history for this message
Andrea Colangelo (warp10) wrote :

Thanks. Uploading now.

Revision history for this message
Jonathan Riddell (jr) wrote :

Accepted into hardy-proposed, please test.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

It runs fine on my PC.

Revision history for this message
Emanuele Gentili (emgent) wrote :

It runs fine on my box too.

Revision history for this message
Joe Kilner (joekilner) wrote :

That update seems to fix things properly.

Thanks.

Changed in enthought-traits-ui:
status: New → Fix Committed
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in enthought-traits-ui:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.