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