urlencode requires a tuple and not an iterable.
This commit is contained in:
parent
029a0c4288
commit
b69b312692
|
@ -46,7 +46,7 @@ class Client(object):
|
||||||
)
|
)
|
||||||
data = itertools.chain(params, data.items(), kwargs.items())
|
data = itertools.chain(params, data.items(), kwargs.items())
|
||||||
|
|
||||||
query = urllib.parse.urlencode(data)
|
query = urllib.parse.urlencode(tuple(data))
|
||||||
url = 'https://api.wolframalpha.com/v2/query?' + query
|
url = 'https://api.wolframalpha.com/v2/query?' + query
|
||||||
resp = urllib.request.urlopen(url)
|
resp = urllib.request.urlopen(url)
|
||||||
assert resp.headers.get_content_type() == 'text/xml'
|
assert resp.headers.get_content_type() == 'text/xml'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user