title: python - AttributeError: 'module' object has no attribute
body: <p>I'm trying this simple code:</p>
  
  <pre><code>import requests
  print requests.__file__
  r = requests.get('https://github.com/timeline.json')
  </code></pre>
  
  <p>It works flawlessly on the command line when I type the lines one by one, but not whenen when I execute it as a script or in Sublime Text 2. Here's the stack trace:</p>
  
  <pre><code>C:\Python27\lib\site-packages\requests\__init__.pyc
  Traceback (most recent call last):
    File "C:\Users\Bruce\Desktop\http.py", line 1, in &lt;module&gt;
      import requests
    File "C:\Python27\lib\site-packages\requests\__init__.py", line 53, in &lt;module&gt;
      from requests.packages.urllib3.contrib import pyopenssl
    File "C:\Python27\lib\site-packages\requests\packages\__init__.py", line 3, in &lt;module&gt;
      from . import urllib3
    File "C:\Python27\lib\site-packages\requests\packages\urllib3\__init__.py", line 16, in &lt;module&gt;
      from .connectionpool import (
    File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 15, in &lt;module&gt;
      from http.client import HTTPConnection, HTTPException
    File "C:\Users\Bruce\Desktop\http.py", line 3, in &lt;module&gt;
      r = requests.get('https://github.com/timeline.json')
  AttributeError: 'module' object has no attribute 'get'
  [Finished in 0.2s with exit code 1]
  </code></pre>
  
  <p>Answers on <a href="https://stackoverflow.com/questions/12258816/module-object-has-no-attribute-get-python-error-requests">&#39;Module object has no attribute &#39;get&#39; Python error Requests?</a> didn't help much.</p>
  
  <p>Could this be some error in my ST2 Python build system? I tried removing all <code>requests</code> modules in case there were multiples of them by using <code>pip</code> and reinstalled them.</p>