Observer crash after double clicking

I made a simple app to track the number of clicks.
Everything works fine and the number of clicks is printed as expected, but the observer stops working after performing double clicks.
How can i solve this issue?

from PySide2 import QtWidgets
import pyvista as pv
import pyvistaqt
from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackballCamera
import sys


class MainWindow(QtWidgets.QMainWindow):

    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)

        self.frame = QtWidgets.QFrame()
        vlayout = QtWidgets.QVBoxLayout()
        self.vtk_widget = pyvistaqt.QtInteractor(self.frame)
        style = MyStyle()
        self.vtk_widget.interactor.SetInteractorStyle(style)
        vlayout.addWidget(self.vtk_widget)
        self.frame.setLayout(vlayout)
        self.setCentralWidget(self.frame)

        sphere = pv.Sphere()
        self.vtk_widget.add_mesh(sphere)


class MyStyle(vtkInteractorStyleTrackballCamera):
    def __init__(self):
        super().__init__()
        self.click_number = 0
        self.AddObserver("LeftButtonPressEvent", self.left_button_press_event)

    def left_button_press_event(self, obj, event):
        self.click_number += 1
        print(self.click_number)




if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())

I found the solution on my own.
It’s better to add the observers directly to the iren:

from PySide2 import QtWidgets
import pyvista as pv
import pyvistaqt
import sys


class MyObserver:
    click_number = 0

    def clicker(self, obj, event):
        self.click_number += 1
        print(self.click_number)


class MainWindow(QtWidgets.QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)

        self.frame = QtWidgets.QFrame()
        vlayout = QtWidgets.QVBoxLayout()
        self.vtk_widget = pyvistaqt.QtInteractor(self.frame)
        observer = MyObserver()
        # Add observer directly to the iren
        self.vtk_widget.iren.add_observer("LeftButtonPressEvent", observer.clicker)
        vlayout.addWidget(self.vtk_widget)
        self.frame.setLayout(vlayout)
        self.setCentralWidget(self.frame)

        sphere = pv.Sphere()
        self.vtk_widget.add_mesh(sphere)


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())