lorin/ansiblebook

ImportError: No module named apps

hly189 opened this issue · 0 comments

I used Ansible version 1.9.3. It was running normally until it ran to the django_manage and these error appears:

Can you please show me how to fixed it.

failed: [web] => {"cmd": "python manage.py createdb --noinput --nodata", "failed": true, "path": "/home/vagrant/mezzanine-example/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games", "state": "absent", "syspath": ["/home/vagrant/.ansible/tmp/ansible-tmp-1454896456.86-205844376608852", "/usr/lib/python2.7", "/usr/lib/python2.7/plat-x86_64-linux-gnu", "/usr/lib/python2.7/lib-tk", "/usr/lib/python2.7/lib-old", "/usr/lib/python2.7/lib-dynload", "/usr/local/lib/python2.7/dist-packages", "/usr/lib/python2.7/dist-packages"]}
msg:
:stderr: Traceback (most recent call last):
File "manage.py", line 28, in
execute_from_command_line(sys.argv)
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/core/management/init.py", line 272, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/core/management/init.py", line 75, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
import(name)
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/mezzanine/core/management/init.py", line 16, in
from mezzanine.utils.tests import copy_test_to_media
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/mezzanine/utils/tests.py", line 12, in
from mezzanine.conf import settings
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/mezzanine/conf/init.py", line 202, in
module = import_module(app)
File "/home/vagrant/mezzanine-example/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
import(name)
ImportError: No module named apps

FATAL: all hosts have already failed -- aborting