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 ...
随机推荐
- hadoop 2.7.7 ERROR datanode.DataNode: BlockSender.sendChunks() exception: java.io.IOException: 你的主机中的软件中止了一个已建立的连接。
最近在测试Hbase在windows上的单机版的功能. 版本:hadoop 2.7.7 hbase 2.0.0 错误: ERROR datanode.DataNode: BlockSender.se ...
- 代码随想录算法训练营Day31 贪心算法| 122.买卖股票的最佳时机II 55. 跳跃游戏 45.跳跃游戏II
代码随想录算法训练营 122.买卖股票的最佳时机II 题目链接:122.买卖股票的最佳时机II 给定一个数组,它的第 i个元素是一支给定股票第 i 天的价格. 设计一个算法来计算你所能获取的最大利润. ...
- 代码随想录算法训练营Day5 数组、链表复习
数组部分 数组最重要的思维方式是双指针的使用. 快慢指针 在进行元素移除和元素操作时会使用两个for循环嵌套,此时时间复杂度为O(n²).在for循环中通过双指针(快慢指针)的使用可以使时间复杂度将为 ...
- C端用户体验度量实战篇-京东快递小程序体验度量全面升级
本文通过介绍体验度量模型升级研究过程.研究方法及研究结果等内容,结合实际C端产品应用,观测新模型运行周期的表现,验证了其在高速发展的业务形态和日益变化的用户需求上的适用性和有效性.我们从体验价值为导向 ...
- k8s实战案例之基于StatefulSet控制器运行MySQL一主多从
1.前言 Pod调度运⾏时,如果应⽤不需要任何稳定的标示.有序的部署.删除和扩展,则应该使⽤⼀组⽆状态副本的控制器来部署应⽤,例如 Deployment 或 ReplicaSet更适合⽆状态服务需求, ...
- php通用用户首页及模板输出代码实例
<?phpnamespace Common\Controller;use Think\Controller;class DefaultController extends Controller ...
- PHP如何获取短网址跳转之前的网址?
现在有很多的短网址应用,点击就跳转到缩短之前的网址了,那今天我们就来看一下,PHP如何**短网址跳转之前的网址,其实也很简单,就是用php的get_headers 函数,取得Response Head ...
- PB从入坑到放弃(一)第一个HelloWorld程序
前言 网上关于PowerBuilder的资料确实是少之又少. 为了方便,后面我们都用pb 来代替PowerBuilder 说到这不得不来说说自己的pb入坑经历, 自己也不是计算机科班出生. 刚到公司面 ...
- 开发中MongoDB遇到的各种问题
目录 一.安装6版本以下 二.安装6版本及以上 三.安装6版本以下(解压版) 四.配置本地 Windows MongoGB 服务 五.navicat 连接远程mongodb数据库 六.ip不一致问题 ...
- JavaCV的摄像头实战之十三:年龄检测
欢迎访问我的GitHub 这里分类和汇总了欣宸的全部原创(含配套源码):https://github.com/zq2599/blog_demos 本篇概览 本文是<JavaCV的摄像头实战> ...