Skip to content

Error in Renaming the Node #2203

@Cosmicoppai

Description

@Cosmicoppai

Short description

Error while Renaming node created using FlowChart class

Code to reproduce

from PyQt5 import QtWidgets as Qtw
from pyqtgraph.flowchart import Flowchart


class MainWindow(Qtw.QWidget):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        layout = Qtw.QGridLayout()

        # Create flowchart, define input/output terminals
        fc = Flowchart(terminals={
            'Input': {'io': 'in'},
            'Output': {'io': 'out'},
        })

        layout.addWidget(fc.widget())
        self.setLayout(layout)
        self.show()


if __name__ == '__main__':
    import sys
    app = Qtw.QApplication(sys.argv)
    w = MainWindow(windowTitle="create FlowChart")
    sys.exit(app.exec_())

Expected behavior

No Traceback

Real behavior

Traceback (most recent call last):
  File "T:\flowchart_test\env\lib\site-packages\pyqtgraph\flowchart\Flowchart.py", line 219, in nodeRenamed
    self.sigChartChanged.emit(self, 'rename', node)
  File "T:\flowchart_test\env\lib\site-packages\pyqtgraph\flowchart\Flowchart.py", line 701, in nodeRenamed

KeyError: <Node lol @25bd816a7a0>

Tested environment(s)

  • PyQtGraph version: 0.12.3
  • Qt Python binding: PyQt5
  • Python version: 3.10
  • Operating system: Windows 10
  • Installation method: pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions