def _thread_fun(self, queue, device, show_q): self.queue = queue self.show_q = show_q if self.use_buffer: self.input_buffer = {} try: self.setup_connections() self.start(device) if DEBUG: print(f"{self.name} starting...") try: while True: try: FPS.update(self.name) if self.use_buffer: self.consume_queue_data() self.run() except StopNodeException: break finally: self.end(device) except Exception as e: traceback.print_exc() instance = self.getWrapper().canvasRef().pyFlowInstance threading.Thread(target=stop_pipeline, args=(instance, )).start() msg = QMessageBox() msg.setIcon(QMessageBox.Critical) msg.setText("Error occured during node execution!") msg.setInformativeText(str(e)) msg.setDetailedText(traceback.format_exc()) msg.setWindowTitle("Node execution error!") msg.setStandardButtons(QMessageBox.Ok) msg.exec()
def _fun(self, device): try: self.setup_connections() self.run(device) except Exception as e: traceback.print_exc() self._terminate() msg = QMessageBox() msg.setIcon(QMessageBox.Critical) msg.setText("Error occured during node execution!") msg.setInformativeText(str(e)) msg.setDetailedText(traceback.format_exc()) msg.setWindowTitle("Node execution error!") msg.setStandardButtons(QMessageBox.Ok) msg.exec()