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

源代码快速部署失败(centos7.4环境) #655

Open
jklZy1 opened this issue Oct 10, 2022 · 2 comments
Open

源代码快速部署失败(centos7.4环境) #655

jklZy1 opened this issue Oct 10, 2022 · 2 comments

Comments

@jklZy1
Copy link

jklZy1 commented Oct 10, 2022

[2022/10/10 13:32:10] [INFO]: [TCAServer] Init main db...
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/commands/createcachetable.py", line 40, in handle
for cache_alias in settings.CACHES:
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/python3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/app/CodeAnalysis/server/projects/main/codedog/init.py", line 12, in
from .celery import celery_app
File "/opt/app/CodeAnalysis/server/projects/main/codedog/celery.py", line 15, in
from celery import Celery
ImportError: cannot import name 'Celery' from 'celery' (/usr/local/python3/lib/python3.7/site-packages/celery/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "manage.py", line 25, in
execute_from_command_line(sys.argv)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 343, in run_from_argv
connections.close_all()
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 232, in close_all
for alias in self:
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 226, in iter
return iter(self.databases)
File "/usr/local/python3/lib/python3.7/site-packages/django/utils/functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 153, in databases
self._databases = settings.DATABASES
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/python3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/app/CodeAnalysis/server/projects/main/codedog/init.py", line 12, in
from .celery import celery_app
File "/opt/app/CodeAnalysis/server/projects/main/codedog/celery.py", line 15, in
from celery import Celery
ImportError: cannot import name 'Celery' from 'celery' (/usr/local/python3/lib/python3.7/site-packages/celery/init.py)
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 82, in wrapped
saved_locale = translation.get_language()
File "/usr/local/python3/lib/python3.7/site-packages/django/utils/translation/init.py", line 254, in get_language
return _trans.get_language()
File "/usr/local/python3/lib/python3.7/site-packages/django/utils/translation/init.py", line 57, in getattr
if settings.USE_I18N:
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/python3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/app/CodeAnalysis/server/projects/main/codedog/init.py", line 12, in
from .celery import celery_app
File "/opt/app/CodeAnalysis/server/projects/main/codedog/celery.py", line 15, in
from celery import Celery
ImportError: cannot import name 'Celery' from 'celery' (/usr/local/python3/lib/python3.7/site-packages/celery/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "manage.py", line 25, in
execute_from_command_line(sys.argv)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/python3/lib/python3.7/site-packages/django/core/management/base.py", line 343, in run_from_argv
connections.close_all()
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 232, in close_all
for alias in self:
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 226, in iter
return iter(self.databases)
File "/usr/local/python3/lib/python3.7/site-packages/django/utils/functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/python3/lib/python3.7/site-packages/django/db/utils.py", line 153, in databases
self._databases = settings.DATABASES
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/python3/lib/python3.7/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/python3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 953, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/app/CodeAnalysis/server/projects/main/codedog/init.py", line 12, in
from .celery import celery_app
File "/opt/app/CodeAnalysis/server/projects/main/codedog/celery.py", line 15, in
from celery import Celery
ImportError: cannot import name 'Celery' from 'celery' (/usr/local/python3/lib/python3.7/site-packages/celery/init.py)

[2022/10/10 13:32:11] [ERROR]: Init main server database failed

@Lingghh
Copy link
Collaborator

Lingghh commented Oct 11, 2022

看起来是celery模块找不到,请问是拉取最新代码部署的么

@laowang6984
Copy link

我用docker部署报一样的错误

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

3 participants