Fix AttributeError: 'NoneType' object has no attribute 'COLOR' for Py…#2984
Open
SayanDey322 wants to merge 1 commit intoOpen-MSS:developfrom
Open
Fix AttributeError: 'NoneType' object has no attribute 'COLOR' for Py…#2984SayanDey322 wants to merge 1 commit intoOpen-MSS:developfrom
SayanDey322 wants to merge 1 commit intoOpen-MSS:developfrom
Conversation
…thon 3.13/3.14
- Change QtCore.Qt.black to QtGui.QColor('black') in DataType.COLOR and editor.py
- Handle None datatype in key_item method
Author
|
Hi please see I have tried to fix the issue. Merge this pull request |
ReimarBauer
requested changes
Jan 18, 2026
Member
There was a problem hiding this comment.
there are a way more colors used
I added the pixi configuration. This didn't solve it.
Because this problem is not covered by a test, we need one before solving this situation. By this it is easier to figure what for the fix is needed. But I assume there are already tests failing because of a change in py313 or a library which is dependent.
The tests here are not running in py313.
ReimarBauer
reviewed
Jan 18, 2026
| QtGui.QBrush(datatype.COLOR), QtCore.Qt.ForegroundRole) | ||
| if datatype: | ||
| key_item.setData(datatype.__class__.__name__, QtCore.Qt.ToolTipRole) | ||
| color = datatype.COLOR |
ReimarBauer
reviewed
Jan 18, 2026
| else: | ||
| key_item.setData("None", QtCore.Qt.ToolTipRole) | ||
| color = QtGui.QColor("black") | ||
| key_item.setData(QtGui.QBrush(color), QtCore.Qt.ForegroundRole) |
Member
There was a problem hiding this comment.
interesting, looks similiar to Qt6 syntax. When was that changed?
from the pixi config we have in both setups the same pyqt.
ReimarBauer
reviewed
Jan 18, 2026
| source_model = self.json_model | ||
| # set default color | ||
| color = QtCore.Qt.black | ||
| color = QtGui.QColor("black") |
Member
There was a problem hiding this comment.
the pyqt version has not changed between py3.12 and py3.13
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.
…thon 3.13/3.14
Purpose of PR?:
Fixes #
Does this PR introduce a breaking change?
If the changes in this PR are manually verified, list down the scenarios covered::
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes
Checklist:
<type>: <subject>