django-q: Import Error running qcluster command Python 3.7 Django 2.1.5

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "ENV/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "ENV/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "ENV/lib/python3.7/site-packages/django/core/management/__init__.py", line 224, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "ENV/lib/python3.7/site-packages/django/core/management/__init__.py", line 36, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "ENV/versions/3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "ENV/lib/python3.7/site-packages/django_q/management/commands/qcluster.py", line 4, in <module>
    from django_q.cluster import Cluster
  File "ENV/lib/python3.7/site-packages/django_q/cluster.py", line 24, in <module>
    from django_q import tasks
  File "ENV/lib/python3.7/site-packages/django_q/tasks.py", line 12, in <module>
    from django_q.cluster import worker, monitor
ImportError: cannot import name 'worker' from 'django_q.cluster' (ENV/lib/python3.7/site-packages/django_q/cluster.py)
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Perhaps, but that’s not the real, ongoing solution. I mean, django-q should not require using the Django admin, at the very least, and the order of INSTALLED_APPS should not make any difference.