TypeError: 'module' object is not callable

 时间:2026-04-24 09:20:04

1、test是模块, class test是类

TypeError: 'module' object is not callable

2、import导入的是模块test,模块test是不能实例化的

TypeError: 'module' object is not callable

3、模块test里的test类是可以实例化的

TypeError: 'module' object is not callable

4、所以此处应该写t = test.test()

TypeError: 'module' object is not callable

5、或者用form 包名.模块名 import 类名的方式导入

TypeError: 'module' object is not callable

6、这样就可以正常运行了,搞清楚包,模块和类的区别即可

TypeError: 'module' object is not callable

  • MFC学习笔记(二):Edit Control控件
  • 如何打开win11的环境变量
  • 怎么用visualstudio
  • Eclipse打开多个console控制台
  • Qtdesiger中使用伙伴编辑
  • 热门搜索
    蒜泥怎么做 被蜜蜂蛰了怎么处理 蟑螂怎么消灭最彻底 怎么和女生聊天 鸽子为什么这么大 襁褓怎么读 痛风怎么办快速止痛 肖战为什么被全网黑 血糖偏高怎么调理能好 流沙包的做法