Search code examples
modulescrapy

Scrapy: No module named 'scrapy.contrib'


I've looked everywhere for a solution to this. I didn't used to have a problem calling "from scrapy.contrib..." but now it throws this error.

File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'scrapy.contrib'

Posting here as a last resort. Any help here would be extremely welcome.


Solution

  • scrapy.contrib has been deprecated for ages now.
    It was removed in the 1.6 release of scrapy.

    For more details, see https://docs.scrapy.org/en/latest/news.html#deprecation-removals