kissmetrics/KISSmetrics — Issue #6: UnicodeEncodeError when constructing Kiss url
Author: poswald
Created: 2011-11-14 00:48:00+00:00
State: open

If you call the Kissmetrics python code with a unicode string it blows up because it uses `str()` to construct a url:

File "/hats/src/kissmetrics/KISSmetrics/__init__.py", line 28, in record
self.request('e', props)
File "/hats-0.19.0/hats/src/kissmetrics/KISSmetrics/__init__.py", line 87, in request
query.append(urllib.quote(str(key)) + '=' + urllib.quote(str(val)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

I am trying to send the username and it doesn't work if the user is using unicode. You guys do support unicode right?