I have written a python script which binds to a socket like this:
from socket import *
addr = (unicode(), 11111)
mySocket = socket(AF_INET, SOCK_STREAM)
mySocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
mySocket.bind(addr)
I package this script with py2exe using setup.py with the following options:
setup(
console=["myProgram.py"],
options = {"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files": 1,
"excludes": ["w9xpopen.exe"],
"packages": ["encodings","codecs"],
}},
zipfile = None)
Under Python 2.5 this works fine. However, when I package the source under python 2.6, I get the following error:
Traceback (most recent call last):
File "Mod_CommsServ.pyo", line 201, in __init
File "<string>", line 1, in bind
LookupError: unknown encoding: idna
As you can see, I already included encodings for py2exe, but the executable still is not able to resolve 'idna'. Can anybody help me?