[SciPy-user] 3d plotting question

Christian Kristukat ckkart at hoc.net
Thu Sep 29 12:48:48 CDT 2005

Prabhu Ramachandran wrote:
>>>>>>"Christian" == Christian Kristukat <ckkart at hoc.net> writes:
>     Christian> Prabhu Ramachandran wrote:
>     >> If that works, you are ready to play with mlab.py which is
>     >> inside enthought/tvtk/tools/mlab.py.  You can run the file as
>     >> it is, to see a spherical harmonic on screen.  See the source
>     >> for some nice examples.
>     >>
>     >> If you have come this far, I hope you are rewarded by all the
>     >> new tools you can play with. :)
>     Christian> Wow!!! That was easy. I'm very impressed. Only the ivtk
>     Christian> example isn't working.  I'm using vtk python 4.2.6. The
>     Christian> traceback follows:
> Terrific!  VTK-4.4 is worth upgrading to if possible.  In any case, I
> forgot that you can also run all the tests in tvtk/tests to make sure
> the core functionality works.  I do the following:

I upgraded to 4.4.2 and now simple.py is no longer working. Is that a TK issue?

Traceback (most recent call last):
  File "simple.py", line 45, in ?
    bw = tvtk.BoxWidget(interactor=rwi, place_factor=1.25,
AttributeError: 'TVTK' object has no attribute 'BoxWidget'

And the ivtk example now results in a X error:

** (python:24725): WARNING **: Cannot open font file for font Adobe Helvetica 12
** (python:24725): WARNING **: Cannot open font file for font Adobe Helvetica
14The program 'python' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 7 error_code 3 request_code 2 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

>  $ cd tvtk/tests
>  $ for i in *.py; do echo $i; python $i; done

Most of them work. I've got no numarray installed but I doubt that it's necessary.

Traceback (most recent call last):
  File "test_array_ext_na.py", line 10, in ?
    import numarray
ImportError: No module named numarray
Ran 2 tests in 0.096s

Ran 6 tests in 0.574s

Ran 6 tests in 0.127s

Ran 9 tests in 0.019s

Ran 5 tests in 0.005s

Ran 11 tests in 0.055s

FAIL: Test the caching of ancestor classes.
Traceback (most recent call last):
  File "test_tvtk.py", line 80, in test_cache
    self.assertEqual(tvtk_helper._cache.has_key(i), True)
  File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: False != True

Ran 21 tests in 14.962s

FAILED (failures=1)
Ran 5 tests in 4.475s

Ran 2 tests in 0.005s


> [...] 
>     Christian> "/usr/lib/python2.3/site-packages/vtk_python/vtk/wx/wxVTKRenderWindowInteractor.py",
>     Christian> line 339, in Render
>     Christian>     self._Iren.GetRenderWindow().SetNextWindowInfo(str(self.GetHandle()))
> If you are willing to do a little bit of surgery, just replace that
> file (wxVTKRenderWindowInteractor.py), with the latest from here:
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py?rev=1.17&view=log

That did not work neither. He's complaining about different VTK versions.

> Then it should hopefully work provided you have wxPython-2.6.x.

Yes, I've wxPyhton 2.6.1.

Regards, Christian

More information about the SciPy-user mailing list