Skip to content Skip to sidebar Skip to footer

Error Converting .ui File To .py File

I created notepad.ui the file in Qt4 Designer and tried to create the notepadwindow.py file by means of a command pyuic4.bat notepad.ui -o notepadwindow.py As a result I got the f

Solution 1:

Some installation issue i guess

pyuic4 notepad.ui > notepad.py

this works for me


Solution 2:

This is how I do it:

pyuic4 -x name.ui -o name.py

of course, in cmd go to the directory where your notepad.ui file is. Good luck.


Solution 3:

I experienced with the same error and was able to solve it.

Although I work on a 64-bit Windows, my python shell (2.7.11) and all extension packages are 32-bit and they work well. I faced with many errors because my PyQt4 that i downloaded was 64-bit. When i remove it and install 32-bit PyQt4 the problem is gone and now i am able to convert .ui files to .py

Maybe your problem is the same with me or visa versa, but the versions of both idle and PyQt should match, either 32 or 64-bit.


Solution 4:

open cmd and go to the directory where the ui file is being saved and there you write the following command.

pyuic4 -w notepad.ui > notepadwindow.py

Solution 5:

I think there are at least two possible error conditions

1.ImportError: DLL load failed: The specified module could not be found.

then you have to check your PyQT version is comptible with your python. In other words, if you use python 3.3, then you can only use PyQT for python3.3 and python 3.3 will not work with PyQT for python3.4

This was the problem I met. I solved it with re-install it

2. Import Error: DLL load failed: %1 then something strange on a different encoding Win32.

then it would be a OS problem. If you use 32bit Python then you have to use 32bit PyQt, so do 64bit


Post a Comment for "Error Converting .ui File To .py File"