当前位置:网站首页>‘module‘ object is not callable错误
‘module‘ object is not callable错误
2022-07-07 09:17:00 【ITSOK_U】
python报错:TypeError: ‘module’ object is not callable(“模块”对象不可调用)
- 具体代码贴在下面,一直找不到是哪里出错,还以为是类名写错应该是小写啥的,最后回头一看原来是我自己的py文件名也是coverage.py。
import coverage
import unittest
if __name__ == "__main__":
# 实例化对象
cov = coverage.coverage()
# 开始分析
cov.start()```
- 这就造成了导入的模块和自己写的程序文件命名一样,这里显然导入的是自己写的这个文件模块,不是引入的coverage。
- 解决办法:更改程序文件名称,如下:鼠标选中程序文件右键,或者快捷键shift+F6,
边栏推荐
- Force buckle 1002 Find common characters
- Network foundation (1)
- The database synchronization tool dbsync adds support for mongodb and es
- 数据库同步工具 DBSync 新增对MongoDB、ES的支持
- Eth trunk link switching delay is too high
- 基于Retrofit框架的金山API翻译功能案例
- JS add spaces to the string
- Avoid mutating a prop directly since the value will be overwritten whenever the parent component
- The post-90s resigned and started a business, saying they would kill cloud database
- VR development optimization
猜你喜欢

对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments

Web端自动化测试失败的原因

Input type= "password" how to solve the problem of password automatically brought in

Deeply understand the characteristics of database transaction isolation

2021-04-23

Transaction rolled back because it has been marked as rollback only
![[untitled]](/img/a0/29975bc0f9832e1640cc39dfce4a71.jpg)
[untitled]

Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)

数据库同步工具 DBSync 新增对MongoDB、ES的支持

基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
随机推荐
How to remove addition and subtraction from inputnumber input box
如何在博客中添加Aplayer音乐播放器
2022.7.4DAY596
[untitled]
What if copying is prohibited?
2021-04-23
從色情直播到直播電商
Arduino board description
CentOS系统下Redis安装和自启动配置的步骤
Using ENSP to do MPLS pseudo wire test
Activity生命周期
Poj1821 fence problem solving Report
Mpx 插件
verilog设计抢答器【附源码】
从色情直播到直播电商
关于SIoU《SIoU Loss: More Powerful Learning for Bounding Box Regression Zhora Gevorgyan 》的一些看法及代码实现
The eighth training assignment
About the application of writing shell script JSON in JMeter
When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?
Kitex retry mechanism