Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Can't import PySide2.QUiLoader

Can't import PySide2.QUiLoader

Anonymous
Not applicable
2,019 Views
4 Replies
Message 1 of 5

Can't import PySide2.QUiLoader

Anonymous
Not applicable

Hey there, 

 

I've installed Max2018 + Update 4 and I can not seem to run the below in max2018

from PySide2.QtUiTools import QUiLoader

I get this as an error when trying to just run this

Traceback (most recent call last):
ImportError: could not import module 'PySide2.QtXml'

I have tested this in 2019 and it runs fine. 

I've also had it "work" (read this as not throw an error) when doing 2 things, an uninstall/reinstall and the Update 4 install. These both have caused Max to not throw the error for exactly 1 time. Every time if I restart Max after it works, the next time onwards, it will throw the error.

 

I've tried getting the site-packages folder from others that don't get the error and nothing works.

I've reinstalled ~3 times, including removing Appdata folders and registry keys in

HKEY_CURRENT_USER\Software\Autodesk

HKEY_LOCAL_MACHINE\Software\Autodesk

relating to 2018. 

 

Is there anything else I can do? I really do need to get this working as I'm in the middle of making a tool...

 

Cheers,

Travis

0 Likes
Accepted solutions (1)
2,020 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Accepted solution

I've figured out a "fix" for this by adding C:\Program Files\Autodesk\3ds Max 2018 into my sys path in Windows Environ vars..

I'd still like an actual answer as to why it is happening, more so why it works the first time after install but not on the 2nd/3rd etc loads.

0 Likes
Message 3 of 5

kevinvandecar
Community Manager
Community Manager

Hi @Anonymous 

Yes I see there was some work done in 3ds Max to resolve some of these issues later. I cannot confirm exactly what changed, but I can see that 2019 and 2020 it seems resolved.

I agree the work around you found is a good one, so hopefully you can get by with that.

hope it helps,

kevin

 


Kevin Vandecar
Developer Technical Services
Autodesk Developer Network



0 Likes
Message 4 of 5

cl
Explorer
Explorer

HI, I am having this exact same issue but I seem to have max 2018 in my sys.path but I am still getting this error. I had it work one time when I rolled back to update 4 but since that one time I get the same error. Can you guys elaborate a bit more on how this was fixed? 

 

Thank you. 

Message 5 of 5

Anonymous
Not applicable

So if you add the path to your 3ds max installation (as I had above)

So it's not in your sys.path (for python) that you need to have the path. It needs to be in your Windows System Environment Variables 

(Just for completeness I'll add the steps below)

  1. Windows key, type Env and select the Edit the System Environment Variables
  2. In the next window at the bottom right there is a button "Environment Variables", click it
  3. In User Variables (top half of window) find "Path", click it and hit edit
  4. Add a New Variable here with the path to your install location.
  5. You may need to move it up or down in the list to get it to work. For our office, I had to move it ABOVE Perforce's variable (if you have that). I have a feeling that for some reason it max was/is using another program's Pyside or something...

This doesn't seem to have actually been fixed from what I can tell but this work around should work...

0 Likes