Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Merge pull request #3669 from Gallaecio/spider-name-collision

Andrey Rahmatullina7bd6fa229f7
diff --cc docs/faq.rst
index 16903daea,34a1e7334..8283cab11
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@@ -398,15 -378,25 +399,26 @@@ How can I cancel the download of a give
--------------------------------------------------
In some situations, it might be useful to stop the download of a certain response.
-For instance, if you only need the first part of a large response and you would like
-to save resources by avoiding the download of the whole body.
-In that case, you could attach a handler to the :class:`~scrapy.signals.bytes_received`
-signal and raise a :exc:`~scrapy.exceptions.StopDownload` exception. Please refer to
-the :ref:`topics-stop-response-download` topic for additional information and examples.
+For instance, sometimes you can determine whether or not you need the full contents
+of a response by inspecting its headers or the first bytes of its body. In that case,
+you could save resources by attaching a handler to the :class:`~scrapy.signals.bytes_received`
+or :class:`~scrapy.signals.headers_received` signals and raising a
+:exc:`~scrapy.exceptions.StopDownload` exception. Please refer to the
+:ref:`topics-stop-response-download` topic for additional information and examples.
+ Running ``runspider`` I get ``error: No spider found in file: <filename>``
+ --------------------------------------------------------------------------
+
+ This may happen if your Scrapy project has a spider module with a name that
+ conflicts with the name of one of the `Python standard library modules`_, such
+ as ``csv.py`` or ``os.py``, or any `Python package`_ that you have installed.
+ See :issue:`2680`.
+
+
.. _has been reported: https://github.com/scrapy/scrapy/issues/2905
+ .. _Python standard library modules: https://docs.python.org/py-modindex.html
+ .. _Python package: https://pypi.org/
.. _user agents: https://en.wikipedia.org/wiki/User_agent
.. _LIFO: https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
.. _DFO order: https://en.wikipedia.org/wiki/Depth-first_search