title: Python requests ImportError: cannot import name HeaderParsingError
body: <p>OS: Mac OS X. When I'm trying to run the code below, I get the error: </p>
  
  <blockquote>
    <p>ImportError: cannot import name HeaderParsingError</p>
  </blockquote>
  
  <p>I've attached traceback below the code.</p>
  
  <p>I've tried to solve this issue for 20 min now, using Google and other stackoverflow. I have tried running: </p>
  
  <blockquote>
    <p>pip install urllib3 --upgrade</p>
  </blockquote>
  
  <p>I've also tried reinstalling the requests package.</p>
  
  <p>It did not help.</p>
  
  <p><strong>This seems to be an issue with my requests or urllib3 package. Has anyone had a similar issue?</strong></p>
  
  <p>The code:</p>
  
  <pre><code>import requests
  import json
  
  
  def printResponse(r):
  print '{} {}\n'.format(json.dumps(r.json(), sort_keys=True, indent=4,    separators=(',', ': ')), r)
  
  
  r = requests.get('http://wikitest.orcsoftware.com/rest/api/content',
               params={'title': 'new page'},
               auth=('seb', '****'))
  printResponse(r)
  parentPage = r.json()['results'][0]
  pageData = {'type': 'comment', 'container': parentPage,
          'body': {'storage': {'value': "&lt;p&gt;A new comment&lt;/p&gt;", 'representation': 'storage'}}}
  r =    requests.post('http://localhost:8080/confluence/rest/api/content',
                data=json.dumps(pageData),
                auth=('admin', 'admin'),
                headers=({'Content-Type': 'application/json'}))
  printResponse(r)
  </code></pre>
  
  <p>This is the traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/sebastian/OneDrive/orc/restAPI/createSpace.py", line 1, in &lt;module&gt;
      import requests
    File "/Library/Python/2.7/site-packages/requests/__init__.py", line 61, in &lt;module&gt;
      from . import utils
    File "/Library/Python/2.7/site-packages/requests/utils.py", line 25, in &lt;module&gt;
      from .compat import parse_http_list as _parse_list_header
    File "/Library/Python/2.7/site-packages/requests/compat.py", ine 7, in &lt;module&gt;
      from .packages import charade as chardet
    File "/Library/Python/2.7/site-packages/requests/packages/__init__.py", line 3, in &lt;module&gt;
      from . import urllib3
    File "/Library/Python/2.7/site-packages/requests/packages/urllib3/__init__.py", line 16, in &lt;module&gt;
      from .connectionpool import (
    File "/Library/Python/2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 33, in &lt;module&gt;
      from .connection import (
    File "/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py", line 41, in &lt;module&gt;
      from .util import (
    File "/Library/Python/2.7/site-packages/requests/packages/urllib3/util/__init__.py", line 4, in &lt;module&gt;
      from .response import is_fp_closed
    File "/Library/Python/2.7/site-packages/requests/packages/urllib3/util/response.py", line 3, in &lt;module&gt;
      from ..exceptions import HeaderParsingError
  ImportError: cannot import name HeaderParsingError
  </code></pre>