下面的代码以
Trace/BPT trap
from tvdb_api import Tvdb
from threading import Thread
class GrabStuff(Thread):
def run(self):
t = Tvdb()
def main():
threads = [GrabStuff() for x in range(1)]
[x.start() for x in threads]
[x.join() for x in threads]
if __name__ == '__main__':
main()
错误发生的原因是
Tvdb()
,但我不知道为什么。
python -m pdb thescript.py
> .../threading.py(468)start()
-> _active_limbo_lock.acquire()
(Pdb)
> .../threading.py(469)start()
-> _limbo[self] = self
(Pdb)
> .../threading.py(470)start()
-> _active_limbo_lock.release()
(Pdb)
> .../threading.py(471)start()
-> _start_new_thread(self.__bootstrap, ())
(Pdb)
> .../threading.py(472)start()
-> self.__started.wait()
(Pdb) Trace/BPT trap
(我将threading.py的完整路径替换为
...
)
同样的问题也发生在
2.6.1
和
2.5.4
. 该机器在OS X 10.6.1 Snow Leopard上运行。这个
tvdb_api
github.com/dbr/tvdb_api