Maya2022 running publish

Targets: default

pyblish_qml.host : Success. QML server available as pyblish_qml.api.current_server()

main”, mod_spec)
TypeError: A constant property cannot have a WRITE method or a NOTIFY signal.
Traceback (most recent call last):
File “D:\pyblish\lib\Python37\lib\runpy.py”, line 193, in _run_module_as_main
File “D:\pyblish\lib\Python37\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "D:\pyblish\lib\Python37\lib\site-packages\pyblish_qml_main
.py", line 6, in
from . import app
File “D:\pyblish\lib\Python37\lib\site-packages\pyblish_qml\app.py”, line 12, in
from . import util, compat, control, settings, ipc
File “D:\pyblish\lib\Python37\lib\site-packages\pyblish_qml\control.py”, line 16, in
class Controller(QtCore.QObject):
File “D:\pyblish\lib\Python37\lib\site-packages\pyblish_qml\control.py”, line 309, in Controller
@QtCore.Property(bool, constant=True)

set constant=False, Python error:“this application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem."

Please help me…

Try a supported version of PyQt, such as 5.9 or 5.11

There’s a complete set of working versions here: https://tech-artists.org/t/maya-2022-pyblish-publishing-alternative/13788/5

thank you.I try…

Hello Marcus,

I am trying to use pyblish_qml but I seem to get the same error.

I have tried with different versions of PyQt5, even with the ones you recommend to use ( 5.9 and 5.11)
I also used 5.15 and I get the same error.

Is there an update to pyblish_qml that I’m not getting? is it possible that it works with the latest version of PyQt5 or at least PySide2 ?

Thank you very much for the answer. I will be eternally grateful.

#####################################################################

# pyblish_qml.host : Installed event filter #
Using Python @ 'C:/Program Files/Autodesk/Maya2022/bin/mayapy.exe'
Using PyQt5 @ 'C:/Program Files/Autodesk/Maya2022/Python37/Lib/site-packages/PyQt5'
Targets: default
# pyblish_qml.host : Success. QML server available as pyblish_qml.api.current_server() #
# Result: <pyblish_qml.ipc.server.Server object at 0x000001C29C0FFBC8> #
Traceback (most recent call last):
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pyblish_qml\__main__.py", line 6, in <module>
from . import app
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pyblish_qml\app.py", line 12, in <module>
from . import util, compat, control, settings, ipc
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pyblish_qml\control.py", line 16, in <module>
class Controller(QtCore.QObject):
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pyblish_qml\control.py", line 309, in Controller
@QtCore.Property(bool, constant=True)
TypeError: A constant property cannot have a WRITE method or a NOTIFY signal.
uninstalling..
removing eventfilter..
removing callbacks..
# pyblish_qml.host : The eventFilter of pyblish-qml has been removed. #

Hi @Daniel_Gayoso, can you confirm this is working?

C:\Program Files\Autodesk\Maya2022\bin\mayapy.exe -m pyblish_qml --demo

Also, what is that UI you’ve screenshotted at the bottom? Can you take me through the steps to reproduce the problem? How do you launch Maya? Have you followed the steps here?

Hi Marcus,

I tried to run the pyblish_qml demo and it generates the same error. I also tried it with python3 (c/python3) and it shows me the same error.

The screenshot is from the Pycharm(2023.2) package installation tool.
I followed the steps in GitHub that you shared, there I show you my python editor in Maya.

#####################################################################

from pyblish_qml import api, show

api.register_python_executable("C:/Program Files/Autodesk/Maya2022/bin/mayapy.exe")
api.register_pyqt5("C:/Program Files/Autodesk/Maya2022/Python37/Lib/site-packages/PyQt5")

show()

Thanks a lot for you support.

I get the same issue in Maya 2022, which seems to run Qt 5.15.

I’ve updated the repository now, and added a script you can use to create a self-contained version of Python + PySide2 and Pyblish QML. Use it to (1) test that it works on your machine, by calling the generated pyblish-qml.ps1 script and (2) as reference for how to configure your environment to use this distribution.

./build_distribution.ps1
# Wait..
./pyblish-qml.ps1

It will create a new directory in your current directory, called pyblish-qml-dist/ with an appropriate Python interpreter, PySide and Pyblish library. You would point to this from e.g. Maya such that this is the interpreter and PySide version that runs the Pyblish QML UI, using the same environment variables as you’ll find in pyblish-qml.ps1.

#pwsh
$env:PYTHONPATH="$psscriptroot\Lib\site-packages"
$env:PYBLISH_QML_PYTHON_EXECUTABLE="$psscriptroot/python.exe"
& ./python.exe -m pyblish_qml --demo

Hi Marcus,

Sorry for the ignorance, but I feel it’s better to ask than to die with the doubt haha. How do I run the script? I understand that it is a type of script that I can run with Windows PoweShell, but for some reason it doesn’t work for me.

Thanks very much! again :slight_smile: