python - Django - Celery Worker won't start; finds multiple errors in apps -
so i've been working on django project months now, , while set test installation of celery worked fine. since time, i've done few things, upgraded third-party apps , django 1.9. today wanted implement celery again , couldn't start. it's throwing multiple errors in apps django isn't complaining about. it's ignoring apps i've overriden.
my file structure
src/ apps/ core/ settings/ production.py development.py __init__.py apps.py celery.py wsgi.py ... app1/ app2/ ... manage.py
my celery.py
from celery import celery os.environ.setdefault('django_settings_module', 'core.settings.development') django.conf import settings app = celery('core') app.config_from_object('django.conf:settings') app.autodiscover_tasks(lambda: settings.installed_apps)
using command:
celery --app=core worker --loglevel=info
i'm getting things like:
file "/users/../src/apps/core/urls.py", line 17, in <module> users.views import * file "/users/../src/apps/users/views.py", line 21, in <module> allauth.account.views import signupview allauthsignupview file "/users/../site/lib/python2.7/site-packages/allauth/account/views.py", line 19, in <module> .forms import ( file "/users/../site/lib/python2.7/site-packages/allauth/account/forms.py", line 206, in <module> class basesignupform(_base_signup_form_class()): file "/users/../site/lib/python2.7/site-packages/allauth/account/forms.py", line 188, in _base_signup_form_class ' "%s"' % (fc_module, e)) django.core.exceptions.improperlyconfigured: error importing form class core.forms: "cannot import name generic"
and
file "/users/../site/lib/python2.7/site-packages/review/models.py", line 3, in <module> django.contrib.contenttypes import generic importerror: cannot import name generic
this last error shouldn't happening @ because i've overriden app in project. it's still reading universally installed option. django, however, runs fine.
any ideas on i'm doing wrong here?
Nice post and useful information
ReplyDeleteThanks
Manish Garg