I wrote a project using eclipse + pydev(python2.7.5). everything goes well under eclipse, but when I want to packet the project to .exe, it does not work. I tried three software.
1.py2exe:
The following modules appear to be missing
['Carbon', 'Carbon.Files', 'OpenSSL.SSL', '_scproxy', '_sysconfigdata', 'builtin
s', 'chardet', 'cjkcodecs.aliases', 'http.client', 'http.cookiejar', 'http.cooki
es', 'iconv_codec', 'mx', 'ndg.httpsclient.ssl_peer_verification', 'ndg.httpscli
ent.subj_alt_name', 'packages.ssl_match_hostname.CertificateError', 'packages.ss
l_match_hostname.match_hostname', 'pyasn1.codec.der', 'queue', 'urllib.parse', '
urllib.request']
but I did not use any of these packets.
2.cx_freeze:
13:35:28: Debug: src/helpers.cpp(140): 'CreateActCtx' failed with error 0x000000
7b (
Traceback (most recent call last):
File "main.py", line 20, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "sunrise\system\conf.pyo", line 14, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "anydbm.pyo", line 53, in <module>
ImportError: no dbm clone found; tried ['dbhash', 'gdbm', 'dbm', 'dumbdbm']
3.pyinstaller there is no error when packeting, but when it runs,:
_("鍙戝竷缃戦〉鍚庡彲娴忚?缃戦〉鐗堬細http://"+self.dbm[self.conf.HOST_NAME
]+"/"+self.dbm[self.conf.PORT_NUMBER]), "",style=wx.NO_BORDER | wx.HL_ALIGN_CENT
RE | wx.HL_CONTEXTMENU)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line
6632, in __init__
_controls_.HyperlinkCtrl_swiginit(self,_controls_.new_HyperlinkCtrl(*args, *
*kwargs))
UnicodeDecodeError: 'gbk' codec can't decode bytes in position 22-23: illegal mu
ltibyte sequence
15:03:53: Debug: ..\..\include\wx/msw/private.h(697): 'UnregisterClass' failed w
ith error 0x00000584 (
it seems the error is because chinese charactor encoding error. but I have added "# -*- coding:UTF-8" before all my codes. and the eclipse 's environment has been set to be utf-8. could anyone help me?
Check if all your strings (with special characters) are marked as unicode: u"你好"
User contributions licensed under CC BY-SA 3.0