cannot urllib.urlencode a URL in python -
why getting error when trying urlencode string
>>> callback = "http://localhost/application/authtwitter?twittercallback" >>> urllib.urlencode(callback) traceback (most recent call last): file "<stdin>", line 1, in <module> file "/usr/lib/python2.7/urllib.py", line 1261, in urlencode raise typeerror typeerror: not valid non-string sequence or mapping object
that's not function does:
urlencode(query, doseq=0) encode sequence of two-element tuples or dictionary url query string.
are looking urllib.quote(callback)
?
Comments
Post a Comment