python3 TypeError: 'str' does not support the buffer interface in python
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                python3 TypeError: 'str' does not support the buffer interface in python
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                http://stackoverflow.com/questions/38714936/typeerror-str-does-not-support-the-buffer-interface-in-python
下面這樣會(huì)報(bào)錯(cuò):
b=b'{"m":1}' import urllib.parse urllib.parse.unquote(b)修正方案:
b=b.decode() urllib.parse.unquote(b)即:對(duì)于字節(jié)流(byte)類型的數(shù)據(jù),因此此類bug時(shí),將它decode一下。
?
轉(zhuǎn)載于:https://www.cnblogs.com/Tommy-Yu/p/6122937.html
總結(jié)
以上是生活随笔為你收集整理的python3 TypeError: 'str' does not support the buffer interface in python的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 梦到鸟屎落到头上是什么意思
 - 下一篇: 梦到好多女人是啥意思