If setup() is called with unicode strings (typical when using "from __future__ import unicode_literals" which I tend to do universally these days), py2exe currently fails with the error "TypeError: decoding Unicode is not supported". This is because the w32_uc function in py2exe.resources.StringTables attempts to unconditionally convert the text parameter to unicode even when text is *already* unicode. The attached patch adds a test to ensure that if text is already unicode, w32_uc doesn't attempt the redundant conversion.
The patch was generated against the SVN trunk revision 722 on 2013-02-23.
Log in to post a comment.