title: "object of type 'NoneType' has no len()" when using pusher with Django
body: <p>I have implemented a very basic and by-the-tutorial Pusher triggers in my django app.
  At first it worked great, but after a few commits I ran into the following exception:</p>
  
  <pre><code>"object of type 'NoneType' has no len()"
  </code></pre>
  
  <p>Out of the second of the following lines:</p>
  
  <pre><code>p = pusher.Pusher()
  p[page_key].trigger('page_update', {'msgid' : message.id})
  </code></pre>
  
  <p>Different or an empty dict produced same result, same as changing page_key to string instead of unicode - nothing.
  Also note that type() of p and p.trigger gives logical results, and they're definitely not None.</p>
  
  <p>This line WORKS IN SOME CASES (which I have no clue what so special about them) and has worked in the past as I've mentioned, yet I can't figure out what am I doing wrong.</p>
  
  <p>It seems that none of the last commits have anything to do with Pusher, so I'm helpless. Searching the web for this exception wasn't fruitful  at all and in general there's not enough documentation regarding to django + Pusher.</p>
  
  <p>It is probably something else that I'm doing wrong but I have no clue where to start looking.</p>
  
  <p>Any help will be most appreciated. </p>
  
  <pre><code>Traceback:
  
    79.         p[page_key].trigger('page_update', {'msgid' : message.id})
  File "/usr/local/lib/python2.7/dist-packages/pusher/__init__.py" in trigger
    41.         status = self.send_request(self.signed_query(event, json_data, socket_id), json_data)
  File "/usr/local/lib/python2.7/dist-packages/pusher/__init__.py" in signed_query
    54.         signature = hmac.new(self.pusher.secret, string_to_sign, hashlib.sha256).hexdigest()
  File "/usr/lib/python2.7/hmac.py" in new
    133.     return HMAC(key, msg, digestmod)
  File "/usr/lib/python2.7/hmac.py" in __init__
    68.         if len(key) &gt; blocksize:
  
  Exception Type: TypeError at /sphere/comment
  Exception Value: object of type 'NoneType' has no len()
  </code></pre>