<p dir="auto">system w10 ,scrapy 1.6.0</p>
<p dir="auto">my scrapy can run nomally long before, but raise AttributeError  recently , I have reinstall the Scrapy ,It's  not help.</p>
<p dir="auto">Scrapy version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Scrapy    : 1.3.3
lxml      : 3.7.3.0
libxml2   : 2.9.3
cssselect : 1.0.1
parsel    : 1.1.0
w3lib     : 1.17.0
Twisted   : 17.1.0
Python    : 3.5.2 (default, Nov 17 2016, 17:05:23) - [GCC 5.4.0 20160609]
pyOpenSSL : 0.15.1 (OpenSSL 1.0.2g  1 Mar 2016)
Platform  : Linux-4.4.0-59-generic-x86_64-with-Ubuntu-16.04-xenial"><pre class="notranslate"><code class="notranslate">Scrapy    : 1.3.3
lxml      : 3.7.3.0
libxml2   : 2.9.3
cssselect : 1.0.1
parsel    : 1.1.0
w3lib     : 1.17.0
Twisted   : 17.1.0
Python    : 3.5.2 (default, Nov 17 2016, 17:05:23) - [GCC 5.4.0 20160609]
pyOpenSSL : 0.15.1 (OpenSSL 1.0.2g  1 Mar 2016)
Platform  : Linux-4.4.0-59-generic-x86_64-with-Ubuntu-16.04-xenial
</code></pre></div>
<p dir="auto">I've got this exception on shutdown:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2017-04-05 18:18:10 [scrapy.core.engine] INFO: Spider closed (finished)
2017-04-05 18:18:10 [scrapy.utils.signal] ERROR: Error caught on signal handler: &lt;bound method TelnetConsole.stop_listening of &lt;scrapy.extensions.telnet.TelnetConsole object at 0x7fbb993bfeb8&gt;&gt;
Traceback (most recent call last):
  File &quot;/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/defer.py&quot;, line 150, in maybeDeferred
    result = f(*args, **kw)
  File &quot;/home/ubuntu/.local/lib/python3.5/site-packages/pydispatch/robustapply.py&quot;, line 55, in robustApply
    return receiver(*arguments, **named)
  File &quot;/home/ubuntu/.local/lib/python3.5/site-packages/scrapy/extensions/telnet.py&quot;, line 63, in stop_listening
    self.port.stopListening()
AttributeError: 'TelnetConsole' object has no attribute 'port'"><pre class="notranslate"><code class="notranslate">2017-04-05 18:18:10 [scrapy.core.engine] INFO: Spider closed (finished)
2017-04-05 18:18:10 [scrapy.utils.signal] ERROR: Error caught on signal handler: &lt;bound method TelnetConsole.stop_listening of &lt;scrapy.extensions.telnet.TelnetConsole object at 0x7fbb993bfeb8&gt;&gt;
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
    result = f(*args, **kw)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/pydispatch/robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/scrapy/extensions/telnet.py", line 63, in stop_listening
    self.port.stopListening()
AttributeError: 'TelnetConsole' object has no attribute 'port'
</code></pre></div>
<p dir="auto">Not sure if it is a real problem, but it'd be nice to shut down without error messages. No idea how to reproduce it, I've only seen it once.</p>