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

’python manage.py celery beat‘ error #596

Open
nagq opened this issue Apr 8, 2020 · 0 comments
Open

’python manage.py celery beat‘ error #596

nagq opened this issue Apr 8, 2020 · 0 comments

Comments

@nagq
Copy link

nagq commented Apr 8, 2020

root@bdfb20f1b9a1:/workspace/backend# python manage.py celery beat
celery beat v3.1.15 (Cipater) is starting.
__    -    ... __   -        _
Configuration ->
    . broker -> redis://mysite-redis:6379/2
    . loader -> djcelery.loaders.DjangoLoader
    . scheduler -> djcelery.schedulers.DatabaseScheduler

    . logfile -> [stderr]@%INFO
    . maxinterval -> now (0s)
[2020-04-08 09:22:24,901: INFO/MainProcess] beat: Starting...
[2020-04-08 09:22:24,901: INFO/MainProcess] Writing entries (0)...
[2020-04-08 09:22:24,901: CRITICAL/MainProcess] beat raised exception <class 'AttributeError'>: AttributeError("'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'",)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/kombu/utils/__init__.py", line 323, in __get__
    return obj.__dict__[self.__name__]
KeyError: 'scheduler'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/apps/beat.py", line 112, in start_scheduler
    beat.start()
  File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 453, in start
    humanize_seconds(self.scheduler.max_interval))
  File "/usr/local/lib/python3.6/site-packages/kombu/utils/__init__.py", line 325, in __get__
    value = obj.__dict__[self.__name__] = self.__get(obj)
  File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 493, in scheduler
    return self.get_scheduler()
  File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 488, in get_scheduler
    lazy=lazy)
  File "/usr/local/lib/python3.6/site-packages/celery/utils/imports.py", line 53, in instantiate
    return symbol_by_name(name)(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 161, in __init__
    Scheduler.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 184, in __init__
    self.setup_schedule()
  File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 169, in setup_schedule
    self.install_default_entries(self.schedule)
  File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 263, in schedule
    self.sync()
  File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 217, in sync
    with commit_on_success():
  File "/usr/local/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.6/site-packages/djcelery/db.py", line 52, in commit_on_success
    if connection.features.autocommits_when_autocommit_is_off:
AttributeError: 'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'
[2020-04-08 09:22:24,902: INFO/MainProcess] Writing entries (0)...
[2020-04-08 09:22:24,903: WARNING/MainProcess] Traceback (most recent call last):
[2020-04-08 09:22:24,903: WARNING/MainProcess] File "/usr/local/lib/python3.6/multiprocessing/util.py", line 262, in _run_finalizers
    finalizer()
[2020-04-08 09:22:24,903: WARNING/MainProcess] File "/usr/local/lib/python3.6/multiprocessing/util.py", line 186, in __call__
    res = self._callback(*self._args, **self._kwargs)
[2020-04-08 09:22:24,903: WARNING/MainProcess] File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 217, in sync
    with commit_on_success():
[2020-04-08 09:22:24,903: WARNING/MainProcess] File "/usr/local/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
[2020-04-08 09:22:24,903: WARNING/MainProcess] File "/usr/local/lib/python3.6/site-packages/djcelery/db.py", line 52, in commit_on_success
    if connection.features.autocommits_when_autocommit_is_off:
[2020-04-08 09:22:24,903: WARNING/MainProcess] AttributeError: 'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'
[2020-04-08 09:22:24,903: INFO/MainProcess] Writing entries (0)...
[2020-04-08 09:22:24,903: WARNING/MainProcess] Traceback (most recent call last):
[2020-04-08 09:22:24,904: WARNING/MainProcess] File "/usr/local/lib/python3.6/multiprocessing/util.py", line 262, in _run_finalizers
    finalizer()
[2020-04-08 09:22:24,904: WARNING/MainProcess] File "/usr/local/lib/python3.6/multiprocessing/util.py", line 186, in __call__
    res = self._callback(*self._args, **self._kwargs)
[2020-04-08 09:22:24,904: WARNING/MainProcess] File "/usr/local/lib/python3.6/site-packages/djcelery/schedulers.py", line 217, in sync
    with commit_on_success():
[2020-04-08 09:22:24,904: WARNING/MainProcess] File "/usr/local/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
[2020-04-08 09:22:24,904: WARNING/MainProcess] File "/usr/local/lib/python3.6/site-packages/djcelery/db.py", line 52, in commit_on_success
    if connection.features.autocommits_when_autocommit_is_off:
[2020-04-08 09:22:24,904: WARNING/MainProcess] AttributeError: 'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'

env

amqp==1.4.9
anyjson==0.3.3
asgiref==3.2.7
backcall==0.1.0
billiard==3.3.0.23
captcha==0.3
celery==3.1.15
celery-with-redis==3.0
certifi==2020.4.5.1
chardet==3.0.4
coreapi==2.3.3
coreschema==0.0.4
cycler==0.10.0
decorator==4.4.2
Django==3.0.4
django-celery==3.3.1
django-filter==2.2.0
django-redis==4.11.0
django-rest-swagger==2.2.0
djangorestframework==3.11.0
flower==0.9.4
gevent==1.4.0
greenlet==0.4.15
gunicorn==20.0.4
humanize==0.5.1
idna==2.9
ipython==6.5.0
ipython-genutils==0.2.0
itypes==1.1.0
jedi==0.16.0
Jinja2==2.11.1
kiwisolver==1.2.0
kombu==3.0.37
Markdown==3.2.1
MarkupSafe==1.1.1
matplotlib==3.2.0
numpy==1.18.2
openapi-codec==1.3.2
parso==0.6.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.1.1
prompt-toolkit==1.0.18
psycopg2==2.8.4
ptyprocess==0.6.0
Pygments==2.6.1
PyJWT==1.7.1
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2019.3
redis==3.4.1
requests==2.23.0
simplegeneric==0.8.1
simplejson==3.17.0
six==1.14.0
sqlparse==0.3.1
supervisor==4.1.0
tornado==6.0.4
traitlets==4.3.3
tzlocal==2.0.0
uritemplate==3.0.1
urllib3==1.25.8
wcwidth==0.1.9

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