1

(https://i.stack.imgur.com/TvwN3.png)

Hello! It's my first Scrapy project and I'm not enought skilled in this.

When I run code and type in terminal "scrapy crawl 'name spider'", then get this problem. However, even type something else, happens same(

(https://i.stack.imgur.com/xrLpj.png) (https://i.stack.imgur.com/kE4AI.png)

A few images how its looks in folders

What should I do for running succesfuly my code? How to fix it? Any ideas? Thank u!

  • Potential answer here: https://stackoverflow.com/questions/37233140/python-module-not-found and here: https://stackoverflow.com/questions/338768/python-error-importerror-no-module-named, also, have you tried "pip install scrapy"? – CBredlow Mar 06 '23 at 18:42
  • Yeah, I have already try it, but still doesn't work. My structure looks good as it seems to me and I've all needed files – xxxkvastarasxxx Mar 06 '23 at 19:32
  • Change your spider's `name` attribute to `"violity_spider"` then run `scrapy crawl violity_spider -o filename.json` – Alexander Mar 06 '23 at 23:38
  • Thanks for correction. However, nothing was changed. – xxxkvastarasxxx Mar 07 '23 at 09:28
  • (venv1) PS D:\pythonProject> cd pricescraper (venv1) PS D:\pythonProject\pricescraper> cd spiders (venv1) PS D:\pythonProject\pricescraper\spiders> scrapy crawl violity_spider -o filename.json ModuleNotFoundError: No module named 'pricescraper' – xxxkvastarasxxx Mar 07 '23 at 09:29
  • 1
    that means you are trying to import pricescraper in a different module. Go through each of the files in your project and make sure you don't have any files trying to import pricescraper – Alexander Mar 08 '23 at 01:19
  • Thank you! That was a problem. I created another folder with name "pricescraper" and fill in all files from folder 'pricescraper' – xxxkvastarasxxx Mar 08 '23 at 10:42

0 Answers0