2017-07-31 49 views
0

everyone。我有issues.Here是我的项目结构:Scrapyd-deploy命令没有从git submodules中获取文件

+-- scraper 
| +-- scraper 
| +-- classification 
| | +-- classifier.py 
| | +-- .gitignore 
| +-- helpers 
| | +-- help1.py 
| +-- spiders 
| | +-- spider1.py 
.gitignore 
.gitmodule 
scrapy.cfg 

当我运行命令scrapyd-deploy scraper -p scraper - 我还没有部署DIR classification这是一个尚未部署git的子模块。我做错了什么?

回答

2

你的树看起来像是缺少__init__.py文件。没有这些文件,scrapyd将无法识别软件包。
所有python包的根目录中都需要包含__init__.py。所以,你应该树看起来更像是:

+-- scraper 
| +-- scraper 
| +-- __init__.py <--- 
| +-- classification 
| | +-- __init__.py <--- 
| | +-- classifier.py 
| | +-- .gitignore 
| +-- helpers 
| | +-- __init__.py <--- 
| | +-- help1.py 
| +-- spiders 
| | +-- __init__.py <--- 
| | +-- spider1.py 
|.gitignore 
|.gitmodule 
|scrapy.cfg 
|setup.py <--- 

,可能有一个setup.py文件的安装说明,以及。

+0

换句话说,他没有使用python包。 – Nabin

+0

非常感谢。它有帮助 – AndMar