python - how register user with xmpp
Question: I'm trying to register a new user, but not work. I get the following error:

    
    
    AttributeError: Client instance has no attribute 'SendAndWaitForResponse'
    

this is my code:

    
    
    import xmpp, sys
    usuario = 'test1@localhost'
    password = 'mypassword'
    jid = xmpp.JID(usuario)
    cli = xmpp.Client(jid.getDomain(), debug=[])
    cli.connect()
    
    if xmpp.features.register(cli,jid.getDomain(),{'username':jid.getNode(),'password':password}):
        sys.stderr.write('Success\n')
        sys.exit(0)
    else:
        sys.stderr.write('Error\n')
        sys.exit(1)
    

i use linux


Answer: I also met this issue. When you remove "debug=[]" from the connect param list.
You can get the debug output. In my side, this issue is because the server can
not be reached.

