$ 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 threading.py, and it's masking the system threading module.

You can verify this by printing threading.__file__:

import threading
print threading.__file__

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'的更多相关文章

  1. 'module' object has no attribute 'Thread'解决方法及模块加载顺序

    源码片段: class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Threa ...

  2. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  3. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  4. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  5. 安装pandas报错(AttributeError: 'module' object has no attribute 'main')

    在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...

  6. AttributeError: 'module' object has no attribute 'enableTrace'

    Traceback (most recent call last): File "Long-lived-connection.py", line 29, in <module ...

  7. python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

    AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 问题背景: 下载工具wydomain,安装依赖包以后,出现下图问题. 几经 ...

  8. AttributeError: 'module' object has no attribute 'main'

    本机环境:ubuntu16.04,  ros-kinetic $ roscore 报错 Traceback (most recent call last): File , in <module& ...

  9. python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'(转)

    原文地址:http://www.cnblogs.com/zhaijiahui/p/7344778.html AttributeError: 'module' object has no attribu ...

随机推荐

  1. FINDPEAKS - matlab函数

    FINDPEAKS Find local peaks in data PKS = FINDPEAKS(X) finds local peaks in the data vector X. A loca ...

  2. Oracle中的Truncate和Delete语句

    Oracle中的Truncate和Delete语句   首先讲一下,truncate命令:   语法:TRUNCATE  TABLE  table; 表格里的数据被清空,存储空间被释放. 运行后会自动 ...

  3. centos下zookeeper集群搭建

    单机模式: 1)  首先下载zookeeper压缩包, 这里采用zookeeper3.4.8.... wget http://mirror.bit.edu.cn/apache/zookeeper/zo ...

  4. 关于scala和java 在maven项目中混编的问题

    1.需要添加scala 相关maven配置: <properties> <scala.version>2.10.1</scala.version> <slf4 ...

  5. linux杂记(八)linux压缩与打包

    linux系统常见的压缩指令 一般被压缩过的档案,通常其附档名都是[*.tar,*.tar.gz,*.tgz,*.gz,*.Z,*.bz2]等等. *.tar:tar程序打包的数据.并没有压缩过 *. ...

  6. vc6.0批量编译

    一直想研究一下怎么让电脑批处理编译程序,今天就从vc6开始,做个记录,学习一下. VC可以生成make文件(Project->Export Makefile),在设置好环境变量下,执行NMAKE ...

  7. Ztree异步树加载

    JSP代码片段 <%@ page language="java" contentType="text/html; charset=utf-8" pageE ...

  8. qcow2、raw、vmdk等镜像格式

    转自 http://www.prajnagarden.com/?p=248 http://blog.csdn.net/starshine/article/details/8179483 转者言:对pr ...

  9. 2013第四届蓝桥杯决赛Java高职高专组题目以及解法答案

    2013第四届蓝桥杯决赛Java高职高专组题目以及解法答案 不知不觉离决赛都过去一个月了,一直忙于各种事情,都忘记整理一份试题.当作回忆也好. 1. 标题:好好学习 汤姆跟爷爷来中国旅游.一天,他帮助 ...

  10. java的访问控制(包、访问修饰符、修饰符)

    一.     java的类包 编写好一个源程序后,首先要执行javac命令进行编译源文件,并生成与源文件同名后缀为“.class”的字节码文件(类文件),该类文件与源文件默认在同一个目录中.该类文件是 ...