scalingexcellence / scrapybook

Scrapy Book Code

Home Page:http://scrapybook.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The spider easy can't work in Chapter 8

polar9527 opened this issue · comments

Page 138
When I ran the script "scrapy crawl easy -s CLOSESPIDER_ITEMCOUNT=90", I got this :

root@dev:~/book/ch08/properties# scrapy crawl easy -s CLOSESPIDER_ITEMCOUNT=90
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 11, in
sys.exit(execute())
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 109, in execute
settings = get_project_settings()
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/project.py", line 60, in get_project_settings
settings.setmodule(settings_module_path, priority='project')
File "/usr/local/lib/python2.7/dist-packages/scrapy/settings/__init__.py", line 108, in setmodule
module = import_module(module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named properties.settings


The file properties.settings was really in the directory, I don't know why it said the file can't be found.

can you help me?
thanks -John

I sovled this problem, It is because there isn't a __init__.py file in you source code in the directory of ch08/properties/properties

Well done. Thanks!