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 ...
随机推荐
- phpstudy-sqlilabs-less-1
题目:POST - Error Based - Double quotes- String - with twist 基于错误的双引号post型字符变形的注入 先抓下包,拿到格式 uname=1#&a ...
- 2021年蓝桥杯C/C++大学B组省赛真题(货物摆放 )
题目描述: 小蓝有一个超大的仓库,可以摆放很多货物. 现在,小蓝有n 箱货物要摆放在仓库,每箱货物都是规则的正方体. 小蓝规定了长.宽.高三个互相垂直的方向,每箱货物的边都必须严格平行于长.宽.高. ...
- 基于nerdctl+buildkitd+containerd实现镜像构建
1.容器技术简介 容器技术除了的docker之外,还有coreOS的rkt.google的gvisor.以及docker开源的containerd.redhat的podman.阿⾥的pouch等,为了 ...
- 2022 i春秋冬季赛
Misc nan's analysis 下载附件之后,打开是一道流量数据包. 开始分析流量,首先看到的是FTP流量 追踪tcp,发现ftp账号密码 先记录一下,接下来发现一个zip文件,选择原始数据, ...
- 解决Mysql 5.7 不能插入中文的问题
问题的解决方案 问题描述 : 在学习DML插入中文数据时 , 发现出现了以下问题 -- 插入数据 insert into tea (id , name) values (2 , '徐凤年'); -- ...
- SpringBoot RabbitMQ 实战解决项目中实践
1 基础预览 1.1 环境准备 Springboot 1.5.6.RELEAS Springcloud Dalston.SR2 1.2 交换机类型 交换机是用来发送消息的AMQP实体.交换机拿到一个消 ...
- Java 使用ArrayList获取10个1-20之间的随机数,要求不能重复
代码如下: public static void main(String[] args) { List<Integer> nums = new ArrayList<Integer&g ...
- 【EF Core】实体的主、从关系
假设有以下两个实体: public class Student { public int StuID { get; set; } public string? Name { get; set; } p ...
- Windows 环境下Docker 安装伪分布式 Hadoop
1.环境 Windows 11 Docker 20.0.2 2.拉取镜像 我选择 ubuntu20.04: docker pull ubuntu:20.04 然后我们用命令看一下本地镜像: docke ...
- python中引用自己封装的包飘红线处理办法
1.安装 opencv-contrib-python 可解决引用自己包名提示 无法识别 2.取消unresolved referencesde 的勾勾