Python - Subprocess Popen and Thread error
Posted
by
n0idea
on Stack Overflow
See other posts from Stack Overflow
or by n0idea
Published on 2012-10-15T15:35:04Z
Indexed on
2012/10/15
15:37 UTC
Read the original article
Hit count: 240
In both functions record and ftp, i have subprocess.Popen
if __name__ == '__main__':
try:
t1 = threading.Thread(target = record)
t1.daemon = True
t1.start()
t2 = threading.Thread(target = ftp)
t2.daemon = True
t2.start()
except (KeyboardInterrupt, SystemExit):
sys.exit()
The error I'm receiving is:
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 504, in run
File "./in.py", line 20, in recordaudio
File "/usr/lib/python2.7/subprocess.py", line 493, in call
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
File "/usr/lib/python2.7/subprocess.py", line 1237, in _execute_child
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'close'
What might the issue be ?
© Stack Overflow or respective owner