Reputation: 1102
In order to update any changes made in Qt Designer (.ui
file), one needs to run the pyuic4.bat
file. This updates the code in the .py
file such that it reflects the changes made in Qt Designer.
Normally running these two lines of code, did the job. The first line changes the directory to where my .ui
and .py
files exist. The second line runs the pyuic4.bat
file to update the .py
file according to the changes made in the .ui
file.
cd C:\Users\blah\Documents\PythonScripts
C:\Users\blah\Anaconda2\Lib\site-packages\PyQt4\pyuic4 guitemplate.ui >> guicode.py
But suddenly, I am getting this error today: The system cannot find the path specified
. I have also tried running cmd
as administrator. I am using Anaconda if that helps. What could be the problem?
This is the code that is contained within the pyuic4.bat
file
@"C:\aroot\stage\python" "C:\aroot\stage\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
Upvotes: 0
Views: 1765
Reputation: 38604
Its impossible for us to know where guitemplate.ui is supposed to be located. If it's along side the bat file then use:
CD/D "%UserProfile%\Anaconda2\Lib\site-packages\PyQt4"
pyuic4.bat -x guitemplate.ui -o "%UserProfile%\Documents\PythonScripts\guicode.py"
If it's along side the intended output file then use:
CD/D "%UserProfile%\Documents\PythonScripts"
"%UserProfile%\Anaconda2\Lib\site-packages\PyQt4\pyuic4.bat" -x guitemplate.ui -o guicode.py
If the above doesn't work then you probably need to change the content of pyuic4.bat to match a possible changed path to your python folder, for example:
@"C:\Anaconda2\python" "C:\Anaconda2\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
Upvotes: 1