TypeError: not a valid non-string sequence or mapping ob
(2013-04-26 14:26:10)
标签:
it |
分类: python |
python字典格式的字符串,编码异常解决
>>> diction = {'bk': "['bookprice_41_64030']"}
>>> urllib.urlencode(str(diction))
Traceback (most recent call last):
TypeError: not a valid non-string sequence or mapping
object
>>> urllib.quote_plus(str(diction))
'{'bk':+"['bookprice_41_64030']"}'
>>>
前一篇:python str 转dict