econchick / new-coder

New Coder tutorials
zlib License
597 stars 394 forks source link

scrapy tutorial - add step for creating __init__.py #197

Open jcshott opened 8 years ago

jcshott commented 8 years ago

After going through the tutorial and trying to run the scraper, I was getting "unable to import" errors on the config file (no module with name scraper_app.settings). finally, I found that I needed an init.py in the scraper_app (and subsequently, upon another error, also in spiders directory). I am still investigating that issue for myself but am thinking those should be in the tutorial.

eenblam commented 8 years ago

@jcshott This is (kinda) covered in the first section of Part 5 of the tutorial. Notice the directory structure described. However, you're right - there's no explicit discussion about the addition of the __init__.py files, and it might be helpful to mention that they just need to exist.

I've added some links below for any other tutorial users who might be wondering about this.

An SO answer regarding __init__.py

Packages in the Python documentation