Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6245429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:30:17+00:00 2026-05-24T12:30:17+00:00

I found in a related question a minimal example to send a message via

  • 0

I found in a related question a minimal example to send a message via xmpp(py); see below. But when I execute the script I get the following error:

   client = xmpp.Client('gmail.com')
AttributeError: 'module' object has no attribute 'Client'

I’m working with Eclipse and PyDev, and xmpppy should definitely be installed. The Interpreter includes /usr/local/lib/python2.7/dist-packages/ and when looking there I find

 /usr/local/lib/python2.7/dist-packages/xmpppy-0.5.0rc1-py2.7.egg
 /usr/local/lib/python2.7/dist-packages/xmpppy-0.5.0rc1-py2.7.egg/xmpp

help(‘modules’) also shows me the xmpp module. When using the autocomplete function (CTRL + SPACE) in Eclipse/PyDev I can actually ‘see’ the client. Still, I get the AttributeError. I guess I’m missing something really stupid here.

Thanks,

Christian

import xmpp

username = 'username'
passwd = 'password'
to='name@example.com'
msg='hello :)'

client = xmpp.Client('gmail.com')
client.connect(server=('talk.google.com',5223))
client.auth(username, passwd, 'botty')
client.sendInitPresence()
message = xmpp.Message(to, msg)
message.setAttr('type', 'chat')
client.send(message)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:30:18+00:00Added an answer on May 24, 2026 at 12:30 pm

    You’ve named a script xmpp.py. You’re accidentally importing it instead of the real xmpp module.

    Rename the script and everything should work fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very much related to my previous question , but I found this to be
I have searched here, but haven't found any question related to this. I got
Here is a related question I found, but it does not answer my question
I found this related question: How do I use composition with inheritance? I would
Related to a question I asked earlier here , I've found a problem which
So, i recently found this term related somehow to neural networks, but I don't
I want to extract data from such regex: <td>[a-zA-Z]+</td><td>[\d]+.[\d]+</td><td>[\d]+</td><td>[\d]+.[\d]+</td> I've found related question extract
I know I already asked related question but now it's a bit different situation.
I found, that there is related question, about how to find if at least
See also related question: How do you debug Qt layout problems I've got some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.