Ошибка импорта: нет модуля с именем 'django_excel' - PullRequest
0 голосов
/ 25 января 2020

Я пытаюсь использовать Django -формы с моим Django веб-приложением. Мое приложение использует следующую версию Django.

Django==2.2.6
django-bootstrap3==11.1.0
django-pandas==0.6.1
djangorestframework==3.11.0

, страница отображается нормально при первой загрузке, но когда я нажимаю на кнопку отправки, она выдает следующую ошибку в терминале.

ImportError: No module named 'django_excel'

Вот полный журнал ... Заранее спасибо!

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/contrib/staticfiles/handlers.py", line 65, in __call__
    return self.application(environ, start_response)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 141, in __call__
    response = self.get_response(request)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 75, in get_response
    response = self._middleware_chain(request)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 36, in inner
    response = response_for_exception(request, exc)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/views/debug.py", line 94, in technical_500_response
    html = reporter.get_traceback_html()
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/views/debug.py", line 333, in get_traceback_html
    c = Context(self.get_traceback_data(), use_l10n=False)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/views/debug.py", line 305, in get_traceback_data
    'filtered_POST_items': list(self.filter.get_post_parameters(self.request).items()),
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/views/debug.py", line 177, in get_post_parameters
    return request.POST
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 110, in _get_post
    self._load_post_and_files()
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/http/request.py", line 315, in _load_post_and_files
    self._post, self._files = self.parse_file_upload(self.META, data)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/http/request.py", line 271, in parse_file_upload
    self.upload_handlers,
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/http/request.py", line 259, in upload_handlers
    self._initialize_handlers()
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/http/request.py", line 253, in _initialize_handlers
    for handler in settings.FILE_UPLOAD_HANDLERS]
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/http/request.py", line 253, in <listcomp>
    for handler in settings.FILE_UPLOAD_HANDLERS]
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/core/files/uploadhandler.py", line 205, in load_handler
    return import_string(path)(*args, **kwargs)
  File "/Users/ritambharachauhan/thoreau-backend-main/venv/lib/python3.5/site-packages/django/utils/module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 985, in _gcd_import
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
ImportError: No module named 'django_excel'
ERROR "POST /water/thoreau-watermaps HTTP/1.1" 500 59
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...