Merged
Conversation
Using pyside2 v5.15.2.1 to run basic_example, I got the following:
AttributeError: 'PySide2.QtWidgets.QApplication' object has no attribute 'exec'. Did you mean: 'exec_'?
Changing the call to exec_ does indeed allow the example to run.
On startup, got the following traceback:
Traceback (most recent call last):
File "/home/chris/Projects/nodes/NodeGraphQt/NodeGraphQt/base/commands.py", line 60, in redo
self.set_node_property(self.name, self.new_val)
File "/home/chris/Projects/nodes/NodeGraphQt/NodeGraphQt/base/commands.py", line 48, in set_node_property
setattr(view, name, value)
File "/home/chris/Projects/nodes/NodeGraphQt/NodeGraphQt/qgraphics/node_base.py", line 795, in icon
pixmap = QtGui.QPixmap(path)
TypeError: 'PySide2.QtGui.QPixmap' called with wrong argument types:
PySide2.QtGui.QPixmap(PosixPath)
Supported signatures:
PySide2.QtGui.QPixmap()
PySide2.QtGui.QPixmap(PySide2.QtCore.QSize)
PySide2.QtGui.QPixmap(PySide2.QtGui.QPixmap)
PySide2.QtGui.QPixmap(str, typing.Optional[bytes] = None, PySide2.QtCore.Qt.ImageConversionFlags = PySide2.QtCore.Qt.ImageConversionFlag.AutoColor)
PySide2.QtGui.QPixmap(PySide2.QtGui.QImage)
PySide2.QtGui.QPixmap(int, int)
PySide2.QtGui.QPixmap(typing.Sequence[str])
Casting the type of the path to the icon to a string fixes this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm looking to get started using NodeGraphQt for a project, and had a little difficulty getting started running the basic example.
First off, my virtual environment looks like this:
With the above dependencies, I required the changes in this pull request to get basic_example.py to work correctly.
With your input, I'd love to add a 'getting started' section to the readme.md which calls out the dependencies and guides the developer through setting up a virtual environment.
Thanks