Python List find方法报错 TypeError: 'str' does not support the buffer interface
来源:互联网 发布:java 线程池 状态 编辑:程序博客网 时间:2024/06/03 01:12
deviceList[1].find('device')
List使用find方法时,报错误:
TypeError: 'str' does not support the buffer interface
In python 3, bytes strings and unicodestrings are now two different types. Bytes strings are b"" enclosed strings
上述语句改为:deviceList[1].find(b'device') 就好了,加了个小b
0 0
- Python List find方法报错 TypeError: 'str' does not support the buffer interface
- Python 3 TypeError: ‘str’ does not support the buffer interface
- TypeError:'str' does not support the buffer interface
- TypeError:’str’ does not support the buffer interface
- TypeError: 'str' does not support the buffer interface
- python socket send 错误:TypeError: 'str' does not support the buffer interface
- Python+client_connection.sendall(http_resp)+TypeError: 'str' does not support the buffer interface
- Python笔记002——错误TypeError: 'str' does not support the buffer interface
- python ‘str’ does not support the buffer interface解决办法
- ‘str' does not support the buffer interface
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- Python 3中套接字编程中遇到TypeError: 'str' does not support the buffer interface的解决办法
- python3中split分割字符串出现错误 TypeError‘str’ does not support the buffer interface
- Python_bug收集_TypeError:'str' does not support the buffer interface
- python3 ‘str’ does not support the buffer interface解决方案
- 对c++友元函数和友元类的理解
- 07PL_SQL过程之复杂数据类型之Record
- see C++ for the first(初识C++)
- 逆波兰式的产生与计算
- [LeetCode]problem 29. Divide Two Integers
- Python List find方法报错 TypeError: 'str' does not support the buffer interface
- 08PL_SQL过程之执行select语句
- 09PL_SQL过程之执行insert语句
- 理解 Ubuntu 16.04 根目录下各个文件夹的功能(草稿)
- static静态变量的理解
- MYSQL-----索引
- 创建"全世界最简单"の单例
- Java NIO系列教程(五) 通道之间的数据传输
- php.ini 文件配置详解