The URI should be unicode. The return value from `urllib.quote()` will be a bytestring, but one with just ASCII and thus safe for decoding to unicode.