scalingexcellence / scrapybook

Scrapy Book Code
http://scrapybook.com/
475 stars 209 forks source link

The spider easy can't work in Chapter 8 #29

Closed polar9527 closed 7 years ago

polar9527 commented 7 years ago

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_modulepath, priority='project') File "/usr/local/lib/python2.7/dist-packages/scrapy/settings/__init_\.py", line 108, in setmodule module = importmodule(module) File "/usr/lib/python2.7/importlib/__init_\.py", line 37, in importmodule __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

polar9527 commented 7 years ago

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

lookfwd commented 7 years ago

Well done. Thanks!