成功解决TypeError: object of type ‘int‘ has no len()

简介: 成功解决TypeError: object of type ‘int‘ has no len()
  • 目录

解决问题

解决思路

解决方法


 

 

 

解决问题

TypeError: object of type 'int' has no len()

 

 

 

 

 

解决思路

类型错误:“int”类型的对象没有len()

 

 

 

 

 

解决方法

很简单的错误,但是粗心导致!

plt.xticks(3, ['111','222','333'])

改为

plt.xticks([1,2,3], ['111','222','333'])


相关文章
|
8月前
|
JSON 数据格式
TypeError: Object of type ‘float32‘ is not JSON serializable
TypeError: Object of type ‘float32‘ is not JSON serializable
129 0
|
JSON 数据格式 Python
TypeError: Object of type 'datetime' is not JSON serializable
TypeError: Object of type 'datetime' is not JSON serializable
142 0
|
NoSQL Redis
Redis序列化的问题:Failed to deserialize object type
您好,我是码农飞哥,感谢您阅读本文!最近在进行框架改造,历史遗留代码对Redis的使用不当,导致了一些问题。
255 0
Redis序列化的问题:Failed to deserialize object type
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
351 0
|
JSON 数据格式 Python
TypeError: Object of type 'datetime' is not JSON serializable
TypeError: Object of type 'datetime' is not JSON serializable
81 0
|
JSON 数据格式 Python
pymongo:Object of type ObjectId is not JSON serializable
1.问题原因 是由于ObjectId无法在服务端生成json数据 请在文件头引入这两个python包
212 0
PHP:Cannot use object of type stdClass as array
PHP:Cannot use object of type stdClass as array
118 0
|
JSON 数据格式
TypeError: Object of type 'datetime' is not JSON serializable
TypeError: Object of type 'datetime' is not JSON serializable
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
|
5月前
|
Java
java判断Object对象是否为空demo
java判断Object对象是否为空demo