Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name get_connection #50

Open
nicholasserra opened this issue Sep 21, 2015 · 0 comments
Open

ImportError: cannot import name get_connection #50

nicholasserra opened this issue Sep 21, 2015 · 0 comments

Comments

@nicholasserra
Copy link

Not sure if this is a known issue, or if I have something set up wrong. Anyway, getting this import error from django-celery-transactions when I run celery. Looks like that package has been abandoned. Looks like a django version problem. I'm running celery 3.0, django 1.5, and haystack 2.1.

Traceback (most recent call last):
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/django/core/management/base.py", line 222, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/management/base.py", line 69, in execute
    super(CeleryCommand, self).execute(*args, **options)
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/django/core/management/base.py", line 255, in execute
    output = self.handle(*args, **options)
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/management/commands/celeryd.py", line 25, in handle
    worker.run(*args, **options)
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/celery/bin/celeryd.py", line 153, in run
    return self.app.Worker(**kwargs).run()
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/celery/apps/worker.py", line 162, in run
    self.app.loader.init_worker()
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/celery/loaders/base.py", line 130, in init_worker
    self.import_default_modules()
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/loaders.py", line 138, in import_default_modules
    self.autodiscover()
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/loaders.py", line 141, in autodiscover
    self.task_modules.update(mod.__name__ for mod in autodiscover() or ())
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/loaders.py", line 176, in autodiscover
    for app in settings.INSTALLED_APPS])
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery/loaders.py", line 195, in find_related_module
    return importlib.import_module('%s.%s' % (app, related_name))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/celery_haystack/tasks.py", line 20, in <module>
    from djcelery_transactions import PostTransactionTask as Task
  File "/Users/nick/.virtualenvs/sprintly/lib/python2.7/site-packages/djcelery_transactions/__init__.py", line 12, in <module>
    from django.db.transaction import get_connection, atomic
ImportError: cannot import name get_connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant