$ 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. if和switch

    在 JavaScript 中,我们可使用以下条件语句:if 语句 -                        只有当指定条件为 true 时,使用该语句来执行代码if...else 语句 -   ...

  2. 大数据之scala高级语法学习

    协变 案例一: class Animal {} class Bird extends Animal {} class Animal {} class Bird extends Animal {} // ...

  3. BZOJ 4321: queue2( dp )

    dp(i, j, 1)表示前i个, 有j对是不合法的, i和i-1是在一起的. dp(i, j, 0)表示前i个, 有j对是不合法的, i和i-1不在一起的. 转移我们只需考虑是多了一对不合法的还是少 ...

  4. 【Howie玩docker】-命令行只显示-bash-4.1#

    灵雀云上面用docker建了个centOS的实例,首个免费,正好当云主机来玩. 但是,打开有个问题,命令行不显示当前用户和路径. 只显示: -bash-4.1# 简单,配置文件不全而已. 下面对其重新 ...

  5. JAVA和.NET互调用

    通过接口实现JAVA和.NET互调用-JNInterface 使用C#编程多年,也十分感激微软在语言架构.语法糖.编辑器等方面给自己带来的便利.但因为最近工作中有接触到JAVA,渐渐地发现的确像大家说 ...

  6. oracle 数据库数据迁移解决方案

    大部分系统由于平台和版本的原因,做的是逻辑迁移,少部分做的是物理迁移,接下来把心得与大家分享一下   去年年底做了不少系统的数据迁移,大部分系统由于平台和版本的原因,做的是逻辑迁移,少部分做的是物理迁 ...

  7. Qt双缓冲机制:实现一个简单的绘图工具(纯代码实现)

    http://blog.csdn.net/rl529014/article/details/51658350

  8. flume-ng+Kafka+Storm+HDFS 实时系统组合

    http://www.aboutyun.com/thread-6855-1-1.html

  9. 我的 Azure VM 为何会重新启动?

    在客户创建的客服案件中, Azure VM意外重启是一个常见的问题,客户要求客服确定重新启动的原因.希望下面的详细说明能够帮助您了解 Azure VM重新启动的原因. WindowsAzure大约 ...

  10. [spring+springmvc+mybatis实践]学生社团管理系统

    一.简介 ssm框架为现在十分流行的mvc主流框架.mybatis负责与数据库交互,springmvc与spring完美适配,负责控制器和视图渲染.之前有初步学习过ssm框架,这次借学校里的web课设 ...