$ 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. |