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 9248747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:01:02+00:00 2026-06-18T10:01:02+00:00

I am new to the Twitter API and python-twitter. I am trying to run

  • 0

I am new to the Twitter API and python-twitter. I am trying to run the simple program below:

import twitter
api = twitter.Api()
user = 'GoldmanSachs'
statuses = api.GetUserTimeline(screen_name=user)
for s in statuses:
    print s

When I run the program in the Python Shell I get the expected output below.

{“created_at”: “Mon Jan 28 22:21:14 +0000 2013”, “favorited”: false,
“id”: 296020134164836353, “retweet_count”: 2, “retweeted”: false,
“source”: “web”, “text”: “ICYMI: WSJ’s Davos Live Blog spoke to FX de
Mallmann about European corporations raising funds in the bond market.
http://t.co/hCLGBOOy“, ….}

However, when I try to save the program and then run it I get an AttributeError:

Traceback (most recent call last):
  File "\twitter.py", line 1, in <module>
    import twitter
  File "\twitter.py", line 6, in <module>
    api = twitter.Api()
AttributeError: 'module' object has no attribute 'Api'

Any thoughts on why this is happening would be greatly appreciated.

  • 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-06-18T10:01:03+00:00Added an answer on June 18, 2026 at 10:01 am

    Most likely you named your program twitter.py and it’s shadowing python-twitter. Rename your script.

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

Sidebar

Related Questions

I am trying out twitter bootstrap and am new to CSS/HTML. Here's my simple
I've been trying to consume the Twitter Streaming API using Python Requests. There's a
I am new to Python and I've been trying to connect to Twitter's public
I am trying to update my Profile info via python-twitter module . >>> api
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
New to twitter api. Requirement: Need to send direct messages to twitter followers of
I'm new to the twitter API https://dev.twitter.com/docs/api and I would like to incentivize users
URL url = new URL(http://twitter.com/statuses/update.xml); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); String cridentials =
I am trying to get twitter updates like this: try { $doc = new
I am new to twitter API started working on it on PHP using this

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.