[PyQt] pyqtdeploy error - QTextCodec.codecForLocale returns None
Chandrakant Gopalan
chandrakant.gopalan at pinogy.com
Tue Apr 26 18:27:05 BST 2016
What should QTextCodec.codecForLocale() return? Also, another coworker with the same setup is facing the same issue.
Does pyqtdeploy support Qt 5.6? Just FYI, I noticed the config file PyQt5-win.cfg created has no "Qt 5.6" section, so I had to manually create one.
----- Original Message -----
From: "Phil Thompson" <phil at riverbankcomputing.com>
To: "Chandrakant Gopalan" <chandrakant.gopalan at pinogy.com>
Cc: "pyqt" <pyqt at riverbankcomputing.com>
Sent: Tuesday, April 26, 2016 12:46:10 PM
Subject: Re: [PyQt] pyqtdeploy error - QTextCodec.codecForLocale returns None
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