[SOLVED] Migration error: No Qt binding were found
2 2

7 posts in this topic

Hello, I've updated the ftrack python api (1.3.1) and installed the latest ftrack connect (0.6.2). I can launch an app like Maya from the browser, but my custom plugins within the app aren't finding the Qt.py binding. I have Qt.py in my own virtual env, but it seems to be looking for Qt.py bindings from within the ftrack connect files:

...
File "path\ftrack_connect\common.zip\Qt.py", line 251, in <module>
File "path\ftrack_connect\common.zip\Qt.py", line 248, in _init
ImportError: No Qt binding were found. # 

Any ideas how to solve this?

 

EDIT: Also, when I try to do something like:

from Qt import QtWidgets

I get the same error. So it looks like the Qt.py path isn't on the python path, but it's there when i check using os.getenv in maya

 

Share this post


Link to post
Share on other sites

Hi Mattias, Sorry for the delay, I was pulled off the pipeline for a bit. I get this error:

from QtExt import QtWidgets
// Error: No Qt binding were found.
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "build\bdist.win-amd64\egg\QtExt\__init__.py", line 12, in <module>
# File "path_to_connect\ftrack_connect\common.zip\Qt.py", line 251, in <module>
# File "path_to_connect\ftrack_connect\common.zip\Qt.py", line 248, in _init
# ImportError: No Qt binding were found. //

This is in Maya 2017 btw

 

Share this post


Link to post
Share on other sites
6 hours ago, lorenzo.angeli said:

Hi Mike, out of curiosity, do you have pyside/qt installed on your local system somewhere ?

if so can you check what version do you have ?

Hi Lorenzo, it looks like I did install a bunch of the ftrack dependencies to my local system, but I'm using a venv for my pipeline (will they conflict?). I'm using Qt.py for all of my PySide needs, but I also have PySide 1.2.4 installed to my venv as well. 

Share this post


Link to post
Share on other sites

Not sure what fixed it exactly, but I removed all the accidental local python packages and added this line to my custom maya hook (along with a bunch of other changes):

if float(application['version']) < 2017:
	environment['QT_PREFERRED_BINDING'] = 'PySide'
else:
    environment['QT_PREFERRED_BINDING'] = 'PySide2'

I think setting the preferred bindings was probably the key.

Share this post


Link to post
Share on other sites

Hi Mike, the QT_PREFERRED_BINDING should be a list, as is the order it tries to import (from qt.py directly).
Should not be needed to have conditionals settings, it should try to import and keep checking if fails (mind trying without your check ?)

https://github.com/mottosso/Qt.py/blob/master/Qt.py#L1417

I'll have a closer look, but I fear having various PySide versions installed might be triggering this.
Cheers.

L.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2