开发者

Creating a spider using Scrapy, Spider generation error

I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command:

scrapy-ctl.py genspider myspider myspdier-domain.com

but it did not work and returns the error:

Error running: scrapy-ctl.py genspider, Cannot find project settings module in python path: scrapy_settings.开发者_如何转开发

I know I have the path set right (to python26/scripts), but I am having difficulty figuring out what the problem is. I am new to both scrapy and python so there is a good possibility that I have failled to do something important.

Also, I have been using eclipse with the Pydev plugin to edit the code if that might cause some problems.


There is a difference between PATH and PYTHON_PATH. Is your PYTHON_PATH set correctly? This path is where python looks to include packages / modules.


use the scrapy-ctl.py in the project's dir. that script will know about that project's settings. the main scrapy-ctl.py doesn't have a clue about that specific project's settings.


Set PYTHONPATH environment variable to python26/scripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜