title: Python httplib2, AttributeError: 'set' object has no attribute 'items'
body: <p>I'm playing with the Python library <a href="http://code.google.com/p/httplib2/" rel="nofollow noreferrer">httplib2</a>. The following is my code.</p>
  <pre><code>import urllib.parse
  import httplib2
  
  httplib2.debuglevel = 1
  
  http = httplib2.Http()
  
  url = &quot;http://login.sina.com.cn/hd/signin.php&quot;
  body = {&quot;act&quot;: &quot;1&quot;,
          &quot;entry&quot;: &quot;vblog&quot;,
          &quot;password&quot;: &quot;P@$sW0rd&quot;,
          &quot;reference&quot;: &quot;http://vupload.you.video.sina.com.cn/u.php?m=1&amp;cate=0&quot;,
          &quot;reg_entry&quot;: &quot;vblog&quot;,
          &quot;remLoginName&quot;: &quot;on&quot;,
          &quot;username&quot;: &quot;this_is_user_name&quot;,
          &quot;x&quot;: &quot;&quot;,
          &quot;y&quot;: &quot;&quot;}
  
  headers = {&quot;Accept&quot;, &quot;text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&quot;,
             &quot;Accept-Charset&quot;, &quot;ISO-8859-1,utf-8;q=0.7,*;q=0.7&quot;,
             &quot;Accept-Encoding&quot;, &quot;gzip,deflate&quot;,
             &quot;Accept-Language&quot;, &quot;en-us,en;q=0.5&quot;,
             &quot;Connection&quot;, &quot;keep-alive&quot;,
             &quot;Content-Length&quot;, &quot;181&quot;,
             &quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;,
             &quot;Host&quot;, &quot;login.sina.com.cn&quot;,
             &quot;Keep-Alive&quot;, &quot;115&quot;,
             &quot;Referer&quot;, &quot;http://login.sina.com.cn/hd/signin.php?entry=vblog&amp;r=http%3A%2F%2Fvupload.you.video.sina.com.cn%2Fu.php%3Fm%3D1%26cate%3D0&quot;,
             &quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16&quot;}
  
  response, content = http.request(url, 'POST', headers=headers, body=urllib.parse.urlencode(body))
  </code></pre>
  <p>When I execute it, I get the error:</p>
  <pre><code>Microsoft Windows XP [Version 5.1.2600]
  (C) Copyright 1985-2001 Microsoft Corp.
  
  C:\&gt;python --version
  Python 3.2
  
  C:\&gt;python a.py
  Traceback (most recent call last):
    File &quot;a.py&quot;, line 32, in &lt;module&gt;
      response, content = http.request(url, 'POST', urllib.parse.urlencode(body), headers=headers)
    File &quot;C:\Python32\lib\site-packages\httplib2\__init__.py&quot;, line 961, in request
      headers = _normalize_headers(headers)
    File &quot;C:\Python32\lib\site-packages\httplib2\__init__.py&quot;, line 184, in _normalize_headers
      return dict([ (key.lower(), NORMALIZE_SPACE.sub(value, ' ').strip())  for (key, value) in headers.items()])
  AttributeError: 'set' object has no attribute 'items'
  
  C:\&gt;
  </code></pre>
  <p>I'm pretty new to Python and httplib2, anything wrong in my code?</p>