Skip to content

TypeError: argument 1 has unexpected type 'BrushStyle' #343

@KB1RD

Description

@KB1RD

To reproduce, download the examples directory, run pip3 install NodeGraphQt, and finally run python3 basic_example.py.

$ python3 basic_example.py 
Traceback (most recent call last):
  File "basic_example.py", line 28, in <module>
    graph = NodeGraph()
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/base/graph.py", line 148, in __init__
    kwargs.get('viewer') or NodeViewer(undo_stack=self._undo_stack)
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/widgets/viewer.py", line 112, in __init__
    self._LIVE_PIPE = LivePipeItem()
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/qgraphics/pipe.py", line 553, in __init__
    super(LivePipeItem, self).__init__()
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/qgraphics/pipe.py", line 53, in __init__
    self.reset()
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/qgraphics/pipe.py", line 471, in reset
    self.set_pipe_styling(color=self.color, width=1.2, style=self.style)
  File "/home/kb1rd/.local/lib/python3.8/site-packages/NodeGraphQt/qgraphics/pipe.py", line 433, in set_pipe_styling
    self.setBrush(QtCore.Qt.NoBrush)
TypeError: setBrush(self, Union[QBrush, QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type 'BrushStyle'

For reference, here is my install output:

$ pip3 install NodeGraphQt
Collecting NodeGraphQt
  Downloading NodeGraphQt-0.6.1-py3-none-any.whl (130 kB)
     |████████████████████████████████| 130 kB 1.7 MB/s 
Collecting Qt.py>=1.2.0
  Downloading Qt.py-1.3.8-py2.py3-none-any.whl (25 kB)
Collecting types-PySide2
  Downloading types_PySide2-5.15.2.1.5-py2.py3-none-any.whl (577 kB)
     |████████████████████████████████| 577 kB 18.1 MB/s 
Installing collected packages: types-PySide2, Qt.py, NodeGraphQt
Successfully installed NodeGraphQt-0.6.1 Qt.py-1.3.8 types-PySide2-5.15.2.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions