Pyside2uic for Maya 2022.1

Hi Guys,

I absolutely need to launch a plugin ( poseWrangler ) on maya 2022.1, this plugin seems to need pyside2uic. But I have an error when I click on the script :

with Python 2 :

# Error: ImportError: file C:\Program Files\Autodesk\Maya2022\Python27\lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py line 142: No module named pyside2uic #

with Python 3 :

# Error: ModuleNotFoundError: file C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py line 142: No module named 'pyside2uic' #

If you have some ideas, please don’t hesitate …

I think Autodesk forgot to include the pyside2uic folder with the Maya 2022 installation. You can grab the pyside2uic folder from Maya 2020, usually found in “C:\Program Files\Autodesk\Maya2020\Python\Lib\site-packages\pyside2uic” and copy it over to where the Maya python path can find it. Could be your Documents/maya/scripts

1 Like

Found here:

The pyside2uic module used in the above solution was removed from the PySide2 code base as of version 5.14.0 (December 2019). However, a request was then filed on the PySide2 issue tracker to “bring back loadUiType”. As of version 5.14.2.2 (May 2020), loadUiType can be imported from the QtUiTools module and works just like it does in PyQt5.

So basically, that plugin is using a deprecated method of building the ui.

From what I can tell though, pyside2uic is a pure-python module, so (seconding MongoWobbler), you should just be able to copy the folder into somewhere on your pythonpath especially if you’re using python2. I don’t know if the module is python3 compatible though, so you may need to run a python-modernize on it.

Otherwise, if you can mess with the source code, you could probably update plugin code to use the PySide2.QtUiTools.loadUiType without too much hassle (if that’s all they’re doing with pyside2uic of course)

1 Like

Thanks @MongoWobbler @tfox_TD
The copied folder from maya 2020 works !

next step : make poseWrangler ( from Chris Evans ) work on maya 2022, for that we need MayaUE4RBFPlugin2022 plugin works ( from Quixel Bridge )