I have a portia scrapy project at ~/portia/slyd/data/projects/scrap
setup to use scrap.middlewares.RandomUserAgentMiddleware
in DOWNLOADER_MIDDLEWARES, RandomUserAgentMiddleware
is defined in ~/portia/slyd/data/projects/scrap/middlewares.py
.
After deploying the project, the resulting egg doesn't contain the middlewares.py
, so I get this error:
ImportError: Error loading object 'scrap.middlewares.RandomUserAgentMiddleware': No module named scrap.middlewares
How do I tell scrapyd-deploy to take the custom middlewares as well?
Edit:
My settings.py
is this: http://pastebin.com/8gFU3YEw
I also tried manually including the middlewares.py
in the generated egg, but it doesn't solve it, still the same error.