title: Server connection issue: "socket.gaierror: [Errno 11004] getaddrinfo failed"
body: <pre><code>socket.gaierror: [Errno 11004] getaddrinfo failed
  </code></pre>
  
  <p>I get this error for a simple ircbot connection script</p>
  
  <pre><code>import sys
  import socket
  import string
  
  HOST="irc.quakenet.net"
  PORT=6667
  NICK="MonstaBot"
  IDENT="mbotv1"
  REALNAME="MonstarulesBot"
  readbuffer=""
  
  s=socket.socket( )
  s.connect((HOST, PORT))
  s.send("NICK %s\r\n" % NICK)
  s.send("USER %s %s bla :%s\r\n" % (IDENT, HOST, REALNAME))
  
  while 1:
      readbuffer=readbuffer+s.recv(1024)
      temp=string.split(readbuffer, "\n")
      readbuffer=temp.pop( )
  
      for line in temp:
          line=string.rstrip(line)
          line=string.split(line)
  
          if(line[0]=="PING"):
              s.send("PONG %s\r\n" % line[1])
  </code></pre>
  
  <p>Any clues as to why I got that error? If this helps a bit here was the full error message.</p>
  
  <pre><code>File "monstabotrun.py", line 13, in &lt;module&gt;
  s.connect((HOST, PORT))
  File "C:\Python27\lib\socket.py", line 224, in meth
  return getattr(self._sock,name)(*args)
  socket.gaierror: [Errno 11004] getaddrinfo failed
  </code></pre>