调用日志输出错误:TypeError: 'int' object is not callable等
*)TypeError: 'int' object is not callable
Traceback (most recent call last):
File "Visualization_bubble_sort.py", line 81, in <module>
plt,_=draw_chart(od)
File "Visualization_bubble_sort.py", line 27, in draw_chart
logging.INFO('%s'%frames[0:3])
TypeError: 'int' object is not callable
原因,应该把INFO改为小写
logging.info('%s'%frames[0:3])
*)TypeError: not all arguments converted during string formatting
logging.warning('--draw_chart--message:frames[4][2]的颜色为:%s'%frames[2][2].color)#这里的frames[2][2].color是一个元组,所以可能与logging里的某些输出方式不符,这里改为
logging.warning('--draw_chart--message:frames[4][2]的颜色为:%s'%str(frames[2][2].color))
调用日志输出错误:TypeError: 'int' object is not callable等的更多相关文章
- python TypeError: 'int' object is not callable 问题解决
TypeError: 'int' object is not callable 这个错误的原因很简单 看下面的程序: def loss(a,b): return a-b loss = 0 loss = ...
- python import 错误 TypeError: 'module' object is not callable
python import 错误 TypeError: 'module' object is not callable 在这里,有 Person.py test.py; 在 test.py 里面 im ...
- 解决Flask和Django的错误“TypeError: 'bool' object is not callable”
跟着欢迎进入Flask大型教程项目!的教程学习Flask,到了重构用户模型的时候,运行脚本后报错: TypeError: 'bool' object is not callable 这是用户模型: c ...
- java/javac命令行如何同时引用多个包;错误 TypeError: 'JavaPackage' object is not callable 的含义
出现这类错误提示:'JavaPackage' object is not callable,可以看下所引用的jar包或者class文件是否在java的路径搜索范围内 命令行模式下:javac可以编译* ...
- python报错:TypeError: 'int' object is not subscriptable
检查一遍报错的所在行,此报错一般是在整数上加了下标: 比如: a = 4 c=a[2] 报错:line 2, in <module> c=a[2] TypeError: 'i ...
- Python : TypeError: 'int' object is not iterable
用循环依次对list中的每个名字打印出 Hello, xxx! -------------------------------------------------------- L = ['Bart' ...
- Python: TypeError: 'dict' object is not callable
问题: TypeError: 'dict' object is not callable 原因: dict()是python的一个内建函数,如果将dict自定义为一个python字典,在之后想调用 ...
- 解决:TypeError: 'list' object is not callable
如果list变量和list函数重名,会有什么后果呢?我们可以参考如下代码: list = ['泡芙', '汤圆', '鱼儿', '骆驼'] tup_1 = (1, 2, 3, 4, 5) tupToL ...
- TypeError: 'module' object is not callable 原因分析
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name self.Sex = sex def ToS ...
随机推荐
- Linux操作系统的压缩、解压缩工具介绍
Linux操作系统的压缩.解压缩工具介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.compress/uncompress命令常用参数 Linux compress命令: ...
- Latex使用过程中的一些总结
本文主要总结在使用Latex过程中遇到的一些问题及解决方案. 一:关于参考文献 1.如何在paper同一处用\cite命令同时引用多篇文献? 用\cite{bibtex1}\cite{bibtex2} ...
- 201871010133-赵永军《面向对象程序设计(java)》第二周学习总结
201871010133-赵永军<面向对象程序设计(java)>第二周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这 ...
- $().ready()与window.onload的不同
1.执行时间 window.onload必须等到页面内包括图片的所有元素加载完毕后才能执行. $(document).ready()是DOM结构绘制完毕后就执行,不必等到加载完毕. 2 ...
- java.lang.IllegalArgumentException: Invalid character found in the request target. The valid charact
线上环境中部署的 Tomcat 项目,出现部分页面无法打开的情况,但本地环境是好的.经过排查发现,本地 Tomcat版本为 7.0.77,而线上版本为 7.0.88.报错的具体描述为java.lang ...
- Java Scanner语法
1.导入: import java.util.Scanner; 2.创建对象 Scanner scan = new Scanner(System.in);//一般变量名为scan或者in 最后关闭,s ...
- TCGA简易下载工具 SangerBox
下载地址:http://sangerbox.com/ https://shengxin.ren/article/208 Understanding TCGA mRNA Level3 analysis ...
- libevent笔记2:Hello_World
本篇通过libevent提供的Hello_World demo简单介绍基于libevent的TCP服务器的实现 listener listener是libevent提供的一种监听本地端口的数据结构,在 ...
- [经验分享]ThinkPad笔记本无法进入PE环境
首先参考:https://jingyan.baidu.com/article/72ee561a564358e16138df14.html 可以设置Secure Boot然后重启电脑,按F1重新进入BI ...
- npm和yarn设置镜像源
npm 设置为淘宝源 npm config set registry https://registry.npm.taobao.org 使用nrm管理 nrm: npm registry manage ...