Hi,
I get
error: (0, 'Error')
whenever I try to use socket bind to make a tcp server socket or to bind a udp socket.
I tried the following program from the python manual. Unfortunately it doesn't get past s.bind. Any ideas on how to work around this?
# Echo server program
import socket
HOST = '' # Symbolic name meaning the local host
PORT = 50007 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
while 1:
data = conn.recv(1024)
if not data: break
conn.send(data)
conn.close()
Error i get is
s.bind((HOST, PORT))
Traceback (most recent call last):
File "<console>", line 1, in ?
File "<string>", line 1, in bind
error: (0, 'Error')
Thanks for any suggestings. I just installed PythonForSeries60_pre_SDK20.SIS on my ngage qd.
I changed the HOST to "localhost", same problem.
Then I changed it to 127.0.0.1, suddenly it no longer crashed. However one can't connect to such an ip from outside world, so I had to hardcode my device ip to 10.0.0.2 and everything worked =)
Thanks for the workaround, but this is obviously a bug. What is the proper place to report such issues?