退出ipython时出现以下错误:
In [3]:
Do you really want to exit ([y]/n)? y
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 763, in run
File "/root/myproject/venv/local/lib/python2.7/site-packages/scrapy/crawler.py", line 130, in start_reactor
File "/root/myproject/venv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1192, in run
File "/root/myproject/venv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1206, in mainLoop
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'msg'
我重新启动了,它不再发生了。这是scrapy shell
命令中的ipython REPL。在REPL中,我运行的代码没有错误。