Unable to start celery worker. Getting the below error while importing Calendar.
$ celery -A openduty worker -l info
Traceback (most recent call last):
File "/usr/local/bin/celery", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/celery/main.py", line 30, in main
main()
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 81, in main
cmd.execute_from_commandline(argv)
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 793, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/usr/local/lib/python2.7/site-packages/celery/bin/base.py", line 311, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 785, in handle_argv
return self.execute(command, argv)
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 717, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/usr/local/lib/python2.7/site-packages/celery/bin/worker.py", line 179, in run_from_argv
return self(*args, *options)
File "/usr/local/lib/python2.7/site-packages/celery/bin/base.py", line 274, in call
ret = self.run(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), kwargs
File "/usr/local/lib/python2.7/site-packages/celery/worker/init.py", line 95, in init
self.app.loader.init_worker()
File "/usr/local/lib/python2.7/site-packages/celery/loaders/base.py", line 128, in init_worker
self.import_default_modules()
File "/usr/local/lib/python2.7/site-packages/celery/loaders/base.py", line 116, in import_default_modules
signals.import_modules.send(sender=self.app)
File "/usr/local/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 166, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/site-packages/celery/fixups/django.py", line 73, in on_import_modules
self.worker_fixup.validate_models()
File "/usr/local/lib/python2.7/site-packages/celery/fixups/django.py", line 158, in validate_models
django_setup()
File "/usr/local/lib/python2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/init.py", line 38, in import_module
import(name)
File "/home/ec2-user/git/openduty/openduty/models.py", line 14, in
from schedule.models import Calendar
ImportError: No module named models
Unable to start celery worker. Getting the below error while importing Calendar.
$ celery -A openduty worker -l info Traceback (most recent call last): File "/usr/local/bin/celery", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/celery/main.py", line 30, in main
main()
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 81, in main
cmd.execute_from_commandline(argv)
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 793, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/usr/local/lib/python2.7/site-packages/celery/bin/base.py", line 311, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 785, in handle_argv
return self.execute(command, argv)
File "/usr/local/lib/python2.7/site-packages/celery/bin/celery.py", line 717, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/usr/local/lib/python2.7/site-packages/celery/bin/worker.py", line 179, in run_from_argv
return self(*args, *options)
File "/usr/local/lib/python2.7/site-packages/celery/bin/base.py", line 274, in call
ret = self.run(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), kwargs
File "/usr/local/lib/python2.7/site-packages/celery/worker/init.py", line 95, in init
self.app.loader.init_worker()
File "/usr/local/lib/python2.7/site-packages/celery/loaders/base.py", line 128, in init_worker
self.import_default_modules()
File "/usr/local/lib/python2.7/site-packages/celery/loaders/base.py", line 116, in import_default_modules
signals.import_modules.send(sender=self.app)
File "/usr/local/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 166, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/site-packages/celery/fixups/django.py", line 73, in on_import_modules
self.worker_fixup.validate_models()
File "/usr/local/lib/python2.7/site-packages/celery/fixups/django.py", line 158, in validate_models
django_setup()
File "/usr/local/lib/python2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/init.py", line 38, in import_module
import(name)
File "/home/ec2-user/git/openduty/openduty/models.py", line 14, in
from schedule.models import Calendar
ImportError: No module named models