# vtkOutputWindow

**URL:** https://discourse.paraview.org/t/vtkoutputwindow/15336
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [September 2, 2024, 11:38am UTC](https://discourse.paraview.org/t/vtkoutputwindow/15336 "2024-09-02T11:38:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ali\_Rahnama](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ali_rahnama/32/5391_2.png) [@Ali\_Rahnama](https://discourse.paraview.org/u/Ali_Rahnama)
#### Post date: [September 2, 2024, 11:38am UTC](https://discourse.paraview.org/t/vtkoutputwindow/15336/1 "2024-09-02T11:38:39Z")

</div>

I’m using a python code that hides paraview error by using the following:  
no\_op\_output\_window = NoOpOutputWindow()  
vtk.vtkOutputWindow.SetInstance(no\_op\_output\_window)

in which :

# Define a no-op vtkOutputWindow class

class NoOpOutputWindow(vtk.vtkOutputWindow):  
def **init** (self):  
super(). **init** ()  
self.error = False # Variable to indicate if output was received  
def DisplayText(self, text):  
self.error = True

so when there is an error , there would be no pop up window (this part works) and no\_op\_output\_window.error=True (this part doesn’t work).  
How should I make no\_op\_output\_window.error=True when there is an error?
