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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:34:57+00:00 2026-06-10T19:34:57+00:00

I just installed the Requests module by using easy_install and I tried to run

  • 0

I just installed the Requests module by using easy_install
and I tried to run the demo code of this tutorial,

import requests
payload = {'username': 'xxxx', 'password': 'xxxxx'}
r = requests.get('https://github.com/timeline.json')

but I get this error:

AttributeError: 'module' object has no attribute 'get'

  • 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-10T19:34:59+00:00Added an answer on June 10, 2026 at 7:34 pm

    You are importing all names from the requests module into your local namespace, which means you do not need to prefix them anymore with the module name:

    >>> from requests import *
    >>> get
    <function get at 0x107820b18>
    

    If you were to import the module with an import requests statement instead, you added the module itself to your namespace and you do have to use the full name:

    >>> import requests
    >>> requests.get
    <function get at 0x102e46b18>
    

    Note that the above examples is what I got from my tests in the interpreter. If you get different results, you are importing the wrong module; check if you have an extra requests.py file in your python package:

    >>> import requests
    >>> print requests.__file__
    /private/tmp/requeststest/lib/python2.7/site-packages/requests/__init__.pyc
    

    You can also test for the name listing provided by the requests module:

    >>> print dir(requests)
    ['ConnectionError', 'HTTPError', 'Request', 'RequestException', 'Response', 'Session', 'Timeout', 'TooManyRedirects', 'URLRequired', '__author__', '__build__', '__builtins__', '__copyright__', '__doc__', '__file__', '__license__', '__name__', '__package__', '__path__', '__title__', '__version__', '_oauth', 'api', 'auth', 'certs', 'codes', 'compat', 'cookies', 'defaults', 'delete', 'exceptions', 'get', 'head', 'hooks', 'models', 'options', 'packages', 'patch', 'post', 'put', 'request', 'safe_mode', 'session', 'sessions', 'status_codes', 'structures', 'utils']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed JBoss and tried to run it from Eclipse. When I first
I just installed Ubuntu 10.10 server with NodeJS 0.4.6 using this guide: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ on
I just installed FuzzyFinder for gvim, though for some reason it's using an ultra
I just installed python2.6 parallel to my python2.4. I ran this command ln -s
I just installed trac for this project I'm working on, since it's turned out
I just installed nodejs v0.6.12 on Ubuntu 10 on Amazon AWS. The code runs
I just installed libgmail on CentOS 5, python 2.6 with easy_install. There was a
I have just installed django-cnotes But it wont work. It just throws up this
Just installed a clean version of mongodb on Fedora 17 64-bit, but the Mongo
Just installed Python 2.7.3 on a Windows7 machine. How do I get .py files

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.