title: AttributeError: module 'requests' has no attribute 'Session'
body: <p>So I was trying to work with requests in python.
  However when I tried to run my code I get this error:</p>
  <blockquote>
  <p>AttributeError: module 'requests' has no attribute 'Session'</p>
  </blockquote>
  <p>I've looked for fixes for my problem but everything I tried didn't work. I've copied this code from a YouTube Tutorial where it seemed to work fine. I'm using Visual Studio Code to run and edit my code.</p>
  <p>But if I run the entire file in the command prompt with: <code>python main.py</code> I get a completely different error message:</p>
  <pre><code>    Traceback (most recent call last):
        File &quot;main.py&quot;, line 20, in &lt;module&gt;
          session = login('samuel', '1234')
        File &quot;main.py&quot;, line 14, in login
          s.headers.update({'authorization': 
  json.loads((s.post('testwebsite/Users/authenticatebyname', json=payload)).content)['token']})
        File &quot;c:\users\samue\appdata\local\activestate\cache\267afc47\lib\json\__init__.py&quot;, line 357, in loads
          return _default_decoder.decode(s)
        File &quot;c:\users\samue\appdata\local\activestate\cache\267afc47\lib\json\decoder.py&quot;, line 337, in decode
          obj, end = self.raw_decode(s, idx=_w(s, 0).end())
        File &quot;c:\users\samue\appdata\local\activestate\cache\267afc47\lib\json\decoder.py&quot;, line 355, in raw_decode
          raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  </code></pre>
  <p>My Code:</p>
  <pre><code>import requests
  import json
  
  
  def login(name, password):
  
      s = requests.Session()
  
      payload = {
          'samuel': name,
          '1234': password
      }
      s.headers.update({'authorization': json.loads((s.post('testwebsite/Users/authenticatebyname', json=payload)).content)['token']})
      print((s.post('testwebsite/Users/authenticatebyname', json=payload)).content)
      return s
  
  
  
  session = login('samuel', '1234')
  </code></pre>