[PyQt] pyqtdeploy error - QTextCodec.codecForLocale returns None
Phil Thompson
phil at riverbankcomputing.com
Tue Apr 26 17:46:10 BST 2016
On 26 Apr 2016, at 5:15 pm, Chandrakant Gopalan <chandrakant.gopalan at pinogy.com> wrote:
>
> Hello,
>
> I am using Python 3.5, PyQt5 with Qt 5.6 on Windows 10 and trying to build a project with pyqtdeploy. The GUI closes whenever theres an error, so I had to run the build via the command line. When I do this I get an error:
>
> c:\Users\cgopalan\pyqtdeploy>pyqtdeploycli --output ./build --project po_gui.pdy --verbose build
> Creating directory .\build
> Creating directory .\build\resources
> ...
> Creating directory .\build\resources\collections
> Creating directory .\build\resources\encodings
> Creating directory .\build\resources\importlib
> Creating directory .\build\resources\PyQt5
> Running 'C:\Python35\python.exe -OO C:/Users/cgopalan/AppData/Local/Temp/qt_temp-py1RVR/freeze.py C:\Users\cgopalan\AppData\Local\Temp\qt_temp-py1RVR\jobs.csv'
> Traceback (most recent call last):
> File "c:\python35\lib\site-packages\pyqtdeploy\builder\builder.py", line 1279, in <lambda>
> QTextCodec.codecForLocale().toUnicode(
> AttributeError: 'NoneType' object has no attribute 'toUnicode'
>
> Please help.
There is presumably a problem with your Qt installation. I wasn't aware of any circumstances where QTextCodec.codecForLocale() would return None. You could try changing the Windows locale.
Phil
More information about the PyQt
mailing list