Pycharm 轉化ui文件爲py文件:報錯Error in input file: not well-formed (invalid token): line 1, column 1

利用PyUIC轉化 .ui文件爲 .py文件時,報錯 Error in input file: not well-formed (invalid token): line 1, column 1

我出錯的原因是工作目錄設置不當。

在File -> Setting -> Tools -> External Tools中重新配置PyUIC,

Program 爲 pyuic5.exe 的路徑。 我這裏爲:C:\Users\WYQ\Anaconda3\Scripts\pyuic5.exe

Arguments 爲:

$FileName$ -o $FileNameWithoutExtension$.py

Working directory爲要將.ui文件轉化爲.py文件的文件夾路徑,這個就因不同的項目而異了。(我就是沒有改變這個目錄,使用的默認路徑)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章