BUGRPT: VTK 3.1 & Python callbacks

David Gobbi dgobbi at irus.rri.on.ca
Tue May 16 13:19:18 EDT 2000


On Tue, 16 May 2000, Randall Hopper wrote:

> David Gobbi:
>  |Randall Hopper:
>  |> It appears that VTK 3.1 doesn't check for error when returning from a
>  |> Python callback
>  |
>  |I noticed this problem about a year ago, but it hasn't come up in any
>  |of my own code recently.  I've committed a fix to CVS.  If you want to
>  |patch your own copy, add
>  |
>  |  if (PyErr_Occurred())
>  |    {
>  |    PyErr_Print();
>  |    }
> 
> Thanks.  I get that stack trace now.
> 
> This won't propagate the error though, will it?  Is there a mechanism to
> fail an object and the pipeline in the VTK internals?
> 
> In Python, this could intuitive surface as an exception thrown by the
> ProgrammableSource object when the Render pass occurs.

Feel free to contribute a better fix.  The Python/C API docs come
with the standard python distribution.  

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list