python3 TypeError: 'str' does not support the buffer interface in python
生活随笔
收集整理的這篇文章主要介紹了
python3 TypeError: 'str' does not support the buffer interface in python
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
http://stackoverflow.com/questions/38714936/typeerror-str-does-not-support-the-buffer-interface-in-python
下面這樣會報錯:
b=b'{"m":1}' import urllib.parse urllib.parse.unquote(b)修正方案:
b=b.decode() urllib.parse.unquote(b)即:對于字節流(byte)類型的數據,因此此類bug時,將它decode一下。
?
轉載于:https://www.cnblogs.com/Tommy-Yu/p/6122937.html
總結
以上是生活随笔為你收集整理的python3 TypeError: 'str' does not support the buffer interface in python的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到鸟屎落到头上是什么意思
- 下一篇: 【Python文件处理】递归批处理文件夹