Properly encode filter_level
authorAaron Hill <aa1ronham@gmail.com>
Sat, 5 Nov 2016 23:46:09 +0000 (19:46 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Sat, 5 Nov 2016 23:46:13 +0000 (19:46 -0400)
Closes #782

tweepy/streaming.py

index 3d3fb4717e727b6f7162d229d2aafde9cf0b0708..2fdab4991a7f7a536afd605e3456dd1b2f12aa5e 100644 (file)
@@ -446,7 +446,7 @@ class Stream(object):
         if languages:
             self.body['language'] = u','.join(map(str, languages))
         if filter_level:
-            self.body['filter_level'] = unicode(filter_level, encoding)
+            self.body['filter_level'] = filter_level.encode(encoding)
         self.session.params = {'delimited': 'length'}
         self.host = 'stream.twitter.com'
         self._start(async)