Hi,
We are trying to run edX Juniper.2 using Python 3.7.8 but we found out issues trying to run the celery workers
Traceback (most recent call last):
File "./manage.py", line 123, in <module>
execute_from_command_line([sys.argv[0]] + django_args)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/djcelery/management/commands/celery.py", line 23, in run_from_argv
['{0[0]} {0[1]}'.format(argv)] + argv[2:],
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/celery.py", line 793, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/base.py", line 311, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/celery.py", line 785, in handle_argv
return self.execute(command, argv)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/celery.py", line 717, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/worker.py", line 179, in run_from_argv
return self(*args, **options)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/base.py", line 274, in __call__
ret = self.run(*args, **kwargs)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/bin/worker.py", line 194, in run
pool_cls = (concurrency.get_implementation(pool_cls) or
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/concurrency/__init__.py", line 29, in get_implementation
return symbol_by_name(cls, ALIASES)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/kombu/utils/__init__.py", line 96, in symbol_by_name
module = imp(module_name, package=package, **kwargs)
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/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 "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/concurrency/prefork.py", line 20, in <module>
from celery.concurrency.base import BasePool
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/concurrency/base.py", line 21, in <module>
from celery.utils import timer2
File "/home/admin/edx-juniper.2-0/apps/edx/venvs/edxapp/lib/python3.7/site-packages/celery/utils/timer2.py", line 19
from kombu.async.timer import Entry, Timer as Schedule, to_timestamp, logger
^
SyntaxError: invalid syntax
We checked the base.txt
requirements file and the celery version listed is 3.1.26.post2
, which doesnât support Python 3.7 according to its release information. Also, async
is a reserved keyword in Python 3.7.
We tried to update celery to a newer version supporting this Python version, but it requires changing other dependencies. Do you know of any workaround to run celery? Are there any plans to upgrade celery in the short term?
Regards,
Gonzalo