title: python xmpp simple client error
body: <p>I'm getting the following error:</p>
  
  <pre><code>AttributeError: Client instance has no attribute 'Dispatcher'
  </code></pre>
  
  <p>while running the following code in python 2.7:</p>
  
  <pre><code>import xmpp 
  
  user= 'uname@gmail.com'
  password="pass"
  
  jid = xmpp.JID(user) 
  connection = xmpp.Client(jid.getDomain()) 
  connection.connect() 
  connection.auth(jid.getNode(),password)
  </code></pre>
  
  <p>Would be happy if someone knows how to fix it.</p>
  
  <p>P.S. Full traceback of the error after the fix proposed by N3RO:</p>
  
  <pre><code>C:\Users\krasnovi\Desktop\temp\xmpp tests&gt;python xmpp.client.py
  Invalid debugflag given: always
  Invalid debugflag given: nodebuilder
  DEBUG:
  DEBUG: Debug created for build\bdist.win-amd64\egg\xmpp\client.py
  DEBUG:  flags defined: always,nodebuilder
  DEBUG: socket       start Plugging &lt;xmpp.transports.TCPsocket instance at 0x0000
  0000027C1708&gt; into &lt;xmpp.client.Client instance at 0x00000000027C1588&gt;
  DEBUG: socket       warn  An error occurred while looking up _xmpp-client._tcp.t
  alk.gmail.com
  DEBUG: socket       error Failed to connect to remote host ('talk.gmail.com', 52
  23): getaddrinfo failed (11004)
  Traceback (most recent call last):
    File "build\bdist.win-amd64\egg\xmpp\transports.py", line 133, in connect
      self._sock.connect((server[0], int(server[1])))
    File "C:\Python27\lib\socket.py", line 224, in meth
      return getattr(self._sock,name)(*args)
  gaierror: [Errno 11004] getaddrinfo failed
  DEBUG: socket       stop  Plugging &lt;xmpp.transports.TCPsocket instance at 0x0000
  0000027C1708&gt; out of &lt;xmpp.client.Client instance at 0x00000000027C1588&gt;.
  Traceback (most recent call last):
    File "xmpp.client.py", line 11, in &lt;module&gt;
      connection.auth(jid.getNode(),password)
    File "build\bdist.win-amd64\egg\xmpp\client.py", line 214, in auth
  AttributeError: Client instance has no attribute 'Dispatcher'
  </code></pre>
  
  <p>Before the fix:</p>
  
  <pre><code>Invalid debugflag given: always
  Invalid debugflag given: nodebuilder
  DEBUG:
  DEBUG: Debug created for build\bdist.win-amd64\egg\xmpp\client.py
  DEBUG:  flags defined: always,nodebuilder
  DEBUG: socket       start Plugging &lt;xmpp.transports.TCPsocket instance at 0x0000
  0000027ED708&gt; into &lt;xmpp.client.Client instance at 0x00000000027ED588&gt;
  DEBUG: socket       error Failed to connect to remote host ('xmpp.l.google.com.'
  , 5222): A connection attempt failed because the connected party did not properl
  y respond after a period of time, or established connection failed because conne
  cted host has failed to respond (10060)
  Traceback (most recent call last):
    File "build\bdist.win-amd64\egg\xmpp\transports.py", line 133, in connect
      self._sock.connect((server[0], int(server[1])))
    File "C:\Python27\lib\socket.py", line 224, in meth
      return getattr(self._sock,name)(*args)
  error: [Errno 10060] A connection attempt failed because the connected party did
   not properly respond after a period of time, or established connection failed b
  ecause connected host has failed to respond
  DEBUG: socket       stop  Plugging &lt;xmpp.transports.TCPsocket instance at 0x0000
  0000027ED708&gt; out of &lt;xmpp.client.Client instance at 0x00000000027ED588&gt;.
  Traceback (most recent call last):
    File "xmpp.client.py", line 11, in &lt;module&gt;
      connection.auth(jid.getNode(),password)
    File "build\bdist.win-amd64\egg\xmpp\client.py", line 214, in auth
  AttributeError: Client instance has no attribute 'Dispatcher'
  </code></pre>