Import Error: No Module Named Socket

I keep getting the following error whenever i try to run a script uploaded to the gateway that uses the socket module:

Traceback :
File “”, line 5 in ?
Import Error: No module named socket

I have python 2.6 installed. I have tried uninstalling it and running python 2.5, it doesnt make a difference. I keep getting the same error: i.e. no module named socket.

I’ve also tried different program codes that have worked before on my gateway & pc that uses the socket module and they worked fine … but i dont know what i’ve done to cause this error. When i run import socket in the python shell, it works fine with no errors. I’ve also tried restoring the gateway to factory default settings and rebooting it but got no luck. I tried to google some answers but it wasnt much help … does anyone know what’s wrong please?

For the current failure – Have you double checked the presence of “” in the filesystem of the gateway? “” is one of the modules that resides there. I would expect a similar error message from “import os” or “import repr”. You can try “import _socket” in order to confirm that the embedded portion of the socket support is in your operating system.

To address potential future failures – The gateways support python 2.4 (2.4.3 to be precise). In many ways, the language is compatible – if 2.6 features are not used, scripts should run the same if executed under 2.4 and 2.6. One major differentiation, however, is that the byte-code encoded “.pyc” files are not compatible.