В настоящее время я столкнулся с проблемой.Хорошо, позвольте мне поделиться им.
Я развернул этот проект на сервере (apache2)
, который работает нормально, а также все операции работают успешно.Но вдруг он получает Internal server error
в основном при входе в систему.Когда я скачал журнал, он показывает мне RuntimeError: empty_like method already has a docstring
.Когда я снова перезагружаю свой сервер, он снова работает без сбоев.Но я думаю, что для этого нужно постоянное решение.Я также хотел бы поделиться полным следом журнала.
Internal Server Error: /
Traceback (most recent call last):
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
resolver_match = resolver.resolve(request.path_info)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/urls/resolvers.py", line 498, in resolve
for pattern in self.url_patterns:
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/utils/functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/urls/resolvers.py", line 540, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/utils/functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/django/urls/resolvers.py", line 533, in urlconf_module
return import_module(self.urlconf_name)
File "/opt/python/ai_rest_env/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/opt/python/my_project/my_project/urls.py", line 19, in <module>
from apps.app_1 import urls as app_1_urls
File "/opt/python/my_project/apps/app_1/urls.py", line 19, in <module>
from .controller import main_controller
File "/opt/python/my_project/apps/app_1/controller/main_controller.py", line 11, in <module>
from .icebreaking_controller import IceBreakingController
File "/opt/python/my_project/apps/app_1/controller/icebreaking_controller.py", line 1, in <module>
from .base_controller import BaseController
File "/opt/python/my_project/apps/app_1/controller/base_controller.py", line 4, in <module>
from ..ai_model_handler.answer_validator import AnswerValidator
File "/opt/python/my_project/apps/app_1/ai_model_handler/answer_validator.py", line 6, in <module>
from ..ai_models.multiclass_cnn.multiclass_cnn_request import MultiClassCNNRequest
File "/opt/python/my_project/apps/app_1/ai_models/multiclass_cnn/multiclass_cnn_request.py", line 11, in <module>
import tensorflow as tf
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 47, in <module>
import numpy as np
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/numpy/core/__init__.py", line 16, in <module>
from . import multiarray
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/numpy/core/multiarray.py", line 70, in <module>
def empty_like(prototype, dtype=None, order=None, subok=None):
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/numpy/core/overrides.py", line 240, in decorator
docs_from_dispatcher=docs_from_dispatcher)(implementation)
File "/opt/python/ai_rest_env/lib/python3.5/site-packages/numpy/core/overrides.py", line 204, in decorator
add_docstring(implementation, dispatcher.__doc__)
RuntimeError: empty_like method already has a docstring
Технология: python3.6
django 2.0.7