base64编码后在进行urlencode提示type eroor
urlliburllib2base64url = data = data_base64 = base64.b64encode(data)data_url = urllib.urlencode(data_base64)url2 = urllib2.Request(urldata_url)response = urllib2.urlopen(url2)apicontent = response.read()apicontent错误:Traceback (most recent call last): File "F:/python_test/", line 7, in data_url = urllib.urlencode("'"+data_base64+"'") File "D:\Python27\lib\urllib.py", line 1333, in urlencode raise TypeErrorTypeError: not a valid non-string sequence or mapping object |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|