问题是在django中同步新的BeautifulSoup包

时间:2011-05-23 06:40:48

标签: python django beautifulsoup

这是追溯,请帮助。

   Traceback (most recent call last):
      File "C:\Documents and Settings\EC.32-SAMUEL\workspace\ec\ec\manage.py", line 11, in <module>
        execute_manager(settings)
      File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line 438, in execute_manager
        utility.execute()
      File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line 379, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "C:\Python26\lib\site-packages\django\core\management\base.py", line 191, in run_from_argv
        self.execute(*args, **options.__dict__)
      File "C:\Python26\lib\site-packages\django\core\management\base.py", line 219, in execute
        self.validate()
      File "C:\Python26\lib\site-packages\django\core\management\base.py", line 249, in validate
        num_errors = get_validation_errors(s, app)
      File "C:\Python26\lib\site-packages\django\core\management\validation.py", line 36, in get_validation_errors
        for (app_name, error) in get_app_errors().items():
      File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 146, in get_app_errors
        self._populate()
      File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 61, in _populate
        self.load_app(app_name, True)
      File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 83, in load_app
        if not module_has_submodule(app_module, 'models'):
      File "C:\Python26\lib\site-packages\django\utils\module_loading.py", line 17, in module_has_submodule
        for entry in package.__path__:  # No __path__, then not a package.
    AttributeError: 'module' object has no attribute '

路径

2 个答案:

答案 0 :(得分:3)

BeautifulSoup不是Django-app。它是一个python包/模块。您不必添加到INSTALLED_APPS。它只需要在您的PYTHONPATH中使用即可。

您的回溯并不能解释您的Django项目究竟出现了什么问题。

答案 1 :(得分:0)

您需要执行syncdb的唯一时间是您必须对数据库执行某些操作。 BeautifulSoup不需要在任何时候使用db,也不需要是已安装的应用程序