AttributeError: 'module' object has no attribute 'Thread'
$ python thread.py
starting at: 2015-08-05 00:24:24
Traceback (most recent call last):
File "thread.py", line 28, in <module>
main()
File "thread.py", line 16, in main
th = threading.Thread(target= test,args= (i,2))
AttributeError: 'module' object has no attribute 'Thread'
Exception AttributeError: '_shutdown' in <module 'threading' from '/home/tim/Desktop/sourceeeeeeeeeeeeeeee//threading.pyc'> ignored
Check that you have not named your script threading.py
|
8 down vote accepted
|
I bet you have a local file named You can verify this by printing
to get the file path of the module that is being imported. Rename it, or delete it, to fix this. |
AttributeError: 'module' object has no attribute 'Thread'的更多相关文章
- 'module' object has no attribute 'Thread'解决方法及模块加载顺序
源码片段: class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Threa ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- 安装pandas报错(AttributeError: 'module' object has no attribute 'main')
在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...
- AttributeError: 'module' object has no attribute 'enableTrace'
Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...
- python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 问题背景: 下载工具wydomain,安装依赖包以后,出现下图问题. 几经 ...
- AttributeError: 'module' object has no attribute 'main'
本机环境:ubuntu16.04, ros-kinetic $ roscore 报错 Traceback (most recent call last): File , in <module& ...
- python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'(转)
原文地址:http://www.cnblogs.com/zhaijiahui/p/7344778.html AttributeError: 'module' object has no attribu ...
随机推荐
- JavaSE思维导图(六)
- asp.net textbox keyup事件触发后台的textchange事件
textbox文本框text_change事件,失去焦点才会执行. 通过keyup事件,js控制失去焦点. <asp:TextBox runat="server" ID=&q ...
- events模块
/** * Created by Administrator on 2016/8/3. */ var http = require("http"); //Node 导入文件系统模块 ...
- 共享bean
到此为止,对于jsp:useBean创建的对象,我们都将它们看作是_jspService方法中的局部变量来处理(jspService由页面生成的servlet的service方法调用).虽然bean的 ...
- What do `?i` and `?-i` in regex mean?
http://stackoverflow.com/questions/15145659/what-do-i-and-i-in-regex-mean
- windows 下面的内存泄漏排查.
内存泄漏排查 一下本人只是简单的介绍一个实用, 如果读者很感兴趣, 可以查阅msdn自己去深入调查相关的API和原理. API 介绍 1. 马上打印泄漏信息:_CrtDumpMemoryLeaks() ...
- java对象的比较分析
关于对象的比较我们可以通过以下三种手段来实现 一.利用"=="比较引用 Java中,当比较简单类型变量时用"==",只要两个简单类型值相等即返回ture,否则返 ...
- Installing perl and writing your first perl program in Ubuntu
Installing perl and writing your first perl program in Ubuntu Installing perl and writing your f ...
- IE 中开发,兼容与性能测试工具汇总
前言 对于开发者来说, IE的兼容性是最让人头疼的. 因为是微软的产品, 且绑定在操作系统上, 所以IE的占用率还是相当大, 对于开发者来说, 这部分的兼容的考虑就不可避免了. 对于IE 的各版本来说 ...
- ios蓝牙开发(四)BabyBluetooth蓝牙库
BabyBluetooth 是一个最简单易用的蓝牙库,基于CoreBluetooth的封装,并兼容ios和mac osx. 特色: 基于原生CoreBluetooth框架封装的轻量级的开源库,可以帮你 ...