Skip to content

Creator tools fails to load on Python 3+ #468

@BigRoy

Description

@BigRoy

Issue

What happened?

When trying to load the creator tool it fails to run because of the following error:

TypeError: setPropertyName(self, Union[QByteArray, bytes, bytearray]): argument 1 has unexpected type 'str'

However, when fixing that code by turning it into setPropertyName(b"value") with the b prefix then it resulted in a crash because of an additonal bug.

TypeError: unable to convert a Python 'NoneType' object to a C++ 'QColor' instance

It fails because of this line introduced with #448. It's easily resolved by initializing the value with a valid QColor as proposed on Gitter

To Reproduce

  • Run Python 3+ with PyQt5
  • Run code:
from avalon.tools import creator
creator.show()

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions