QA||TypeError: ‘module‘ object is not callable报错怎么debugIHRM接口自动化测试
unittest.py生成测试报告时执行报错:TypeError: ‘module‘ object is not callable
代码如下
原因:结合pycharm自动标注和报错信息,分析出应该是HTMLTestRunner使用问题,结合网上查阅说是因为import的问题,所以基本问题定位到了HTMLTestRunner应该导入HTMLTestRunner.py中的HTMLTestRunner,而不是HTMLTestRunner.py文件,修改后如下:
修改后执行正确无报错,完美
参考:(123条消息) Python错误之:TypeError: ‘module‘ object is not callable_ILHONG的博客-CSDN博客
QA||TypeError: ‘module‘ object is not callable报错怎么debugIHRM接口自动化测试的更多相关文章
- PyCharm+selenium环境搭建报错:Traceback (most recent call last): TypeError: 'module' object is not callable
环境搭建好后,代码如下: from selenium import webdriverdriver = webdriver.chrome()driver.get("http://www.ba ...
- pip install 报错 TypeError: 'module' object is not callable
$ pip install filetype Traceback (most recent call last): File "/usr/local/bin/pip2", line ...
- pip安装pillow——死循环:[WinError5] & [TypeError:'module' object is not callable]
1.这次本来要安装个pillow,记得以前装了的,怎么这次就不行了.然后,下意识的使用:pip3 install pillow. 发现报错: [TypeError:'module' object is ...
- python -- TypeError: 'module' object is not callable
文件: 代码: import pprintmessge = 'It was a bringht cold day in April,and the clocks were striking thrir ...
- TypeError: 'module' object is not callable cp fromhttp://blog.csdn.net/huang9012/article/details/17417133
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name ...
- Python TypeError: 'module' object is not callable 原因分析
今天尝试使用pprint进行输出,语句为 >>>import pprint >>>pprint(people) 结果报错,TypeError: 'module' o ...
- python import 错误 TypeError: 'module' object is not callable
python import 错误 TypeError: 'module' object is not callable 在这里,有 Person.py test.py; 在 test.py 里面 im ...
- TypeError: 'module' object is not callable 原因分析
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name self.Sex = sex def ToS ...
- TypeError: 'int' object is not subscriptable 报错
Python中报错TypeError: 'int' object is not subscriptable 原因:整形数据中加了下标索引 例如 #python utf-8 a = 10 b = a[0 ...
- python 报错——Python TypeError: 'module' object is not callable 原因分析
原因分析:Python导入模块的方法有两种: import module 和 from module import 区别是前者所有导入的东西使用时需加上模块名的限定,而后者则不需要 例: >&g ...
随机推荐
- 如何将jq动画做出高帧的感觉?(丝滑顺畅)
前言 我最近在一点一点研究我 博客园 的前端代码,算是边敲边学吧,还算是挺有意思的. 是这样的,之前见过一个效果,就是先显示博客的背景,然后博客主界面缓缓的上升到正确位置,于是乎,干他!开撸代码! 各 ...
- 基于.NetCore开源的Windows的GIF录屏工具
推荐一个Github上Start超过20K的超火.好用的屏幕截图转换为 GIF 动图开源项目. 项目简介 这是基于.Net Core + WPF 开发的.开源项目,可将屏幕截图转为 GIF 动画.它的 ...
- js有关dom操作学习
dom对象就是操作网页的document dom节点: 整个文档是一个文档节点(document对象) 每个 HTML 元素是元素节点(element 对象) HTML 元素内的文本是文本节点(tex ...
- Docker 的安装及常用命令
CentOS Docker 安装 参看链接 Windows安装 Docker Desktop 官方下载地址: https://hub.docker.com/editions/community/doc ...
- [ARM 汇编]进阶篇—异常处理与中断—2.4.1 异常处理概念
异常处理简介 在ARM汇编开发中,异常处理和中断是常见的概念,它们是对系统运行过程中出现的特殊情况进行处理的一种机制.异常处理和中断包括硬件异常.软件异常和外部中断等.当处理器遇到这些特殊情况时,它会 ...
- Typora 主题Mo Dark 样式
Mo Dark 主题样式 html { font-size: 16px; } /*加粗字体样式*/ strong { -webkit-background-clip: text; -webkit-te ...
- mysql where和having的用法例子
结论:想在分组之后在进行过滤就要使用having了,如果只是对指定的行进行过滤的话,那么就需要使用where了
- AI-2预备知识
2.1数据操作笔记 PyTorch和TensorFlow中的Tensor类型可做为张量使用,可支持GPU操作和自动微分. 广播机制:对不同形状的张量可使用广播机制进行运算. 为节省内存,可使用 X[: ...
- 【Oracle】当条件中存在空值时,同时将空值和非空值的结果查询出来
[Oracle]当条件中存在空值时,同时将空值和非空值的结果查询出来 如果不是一定要用这个存在空值的条件的话,最好还是不用为好,省的麻烦 正常的查询结果如下 select * from ttt2023 ...
- CentOS 8搭建Kubernetes-k8s集群-1.18.5
目录 环境配置 服务器信息 软件版本 环境正确性 端口正常开放 kube-master节点端口 kube-node节点端口 配置主机互信 配置hosts映射 配置ssh密钥 禁用swap 关闭SELi ...