WARNINGS: ?: (1_7.W001) MIDDLEWARE_CLASSES is not set. #7

Closed
opened 2020-07-22 18:24:29 +02:00 by Ghost · 1 comment

After my first run, I decided to stop the server and now after restarting it again, I m getting:

pi@raspberrypi:~/hrss $ python3 manage.py runserver 0.0.0.0:8000
Performing system checks...

System check identified some issues:

WARNINGS:
?: (1_7.W001) MIDDLEWARE_CLASSES is not set.
HINT: Django 1.7 changed the global defaults for the MIDDLEWARE_CLASSES. django.contrib.sessions.middleware.SessionMiddleware, django.contrib.auth.middleware.AuthenticationMiddleware, and django.contrib.messages.middleware.MessageMiddleware were removed from the defaults. If your project needs these middleware then you should configure this setting.

System check identified 1 issue (0 silenced).
July 22, 2020 - 16:20:19
Django version 1.8.6, using settings 'hrss.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[2020-07-22 16:20:26,170] [ERROR] [base] Internal Server Error: /
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 393, in urlconf_module
return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 119, in get_response
resolver_match = resolver.resolve(request.path_info)
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 365, in resolve
for pattern in self.url_patterns:
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 401, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 395, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/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 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 "/home/pi/hrss/hrss/urls.py", line 17, in
from django.urls import path
ModuleNotFoundError: No module named 'django.urls'
[22/Jul/2020 16:20:26] "GET / HTTP/1.1" 500 88113
[2020-07-22 16:20:27,392] [ERROR] [base] Internal Server Error: /favicon.ico
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 393, in urlconf_module
return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 108, in get_response
response = middleware_method(request)
File "/usr/local/lib/python3.7/dist-packages/django/middleware/common.py", line 74, in process_request
if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 646, in is_valid_path
resolve(path, urlconf)
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 521, in resolve
return get_resolver(urlconf).resolve(path)
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 365, in resolve
for pattern in self.url_patterns:
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 401, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 395, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/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 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 "/home/pi/hrss/hrss/urls.py", line 17, in
from django.urls import path
ModuleNotFoundError: No module named 'django.urls'
[22/Jul/2020 16:20:27] "GET /favicon.ico HTTP/1.1" 500 104957

After my first run, I decided to stop the server and now after restarting it again, I m getting: pi@raspberrypi:~/hrss $ python3 manage.py runserver 0.0.0.0:8000 Performing system checks... System check identified some issues: WARNINGS: ?: (1_7.W001) MIDDLEWARE_CLASSES is not set. HINT: Django 1.7 changed the global defaults for the MIDDLEWARE_CLASSES. django.contrib.sessions.middleware.SessionMiddleware, django.contrib.auth.middleware.AuthenticationMiddleware, and django.contrib.messages.middleware.MessageMiddleware were removed from the defaults. If your project needs these middleware then you should configure this setting. System check identified 1 issue (0 silenced). July 22, 2020 - 16:20:19 Django version 1.8.6, using settings 'hrss.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C. [2020-07-22 16:20:26,170] [ERROR] [base] Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 393, in urlconf_module return self._urlconf_module AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 119, in get_response resolver_match = resolver.resolve(request.path_info) File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 365, in resolve for pattern in self.url_patterns: File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 401, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 395, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/usr/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/pi/hrss/hrss/urls.py", line 17, in <module> from django.urls import path ModuleNotFoundError: No module named 'django.urls' [22/Jul/2020 16:20:26] "GET / HTTP/1.1" 500 88113 [2020-07-22 16:20:27,392] [ERROR] [base] Internal Server Error: /favicon.ico Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 393, in urlconf_module return self._urlconf_module AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 108, in get_response response = middleware_method(request) File "/usr/local/lib/python3.7/dist-packages/django/middleware/common.py", line 74, in process_request if (not urlresolvers.is_valid_path(request.path_info, urlconf) and File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 646, in is_valid_path resolve(path, urlconf) File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 521, in resolve return get_resolver(urlconf).resolve(path) File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 365, in resolve for pattern in self.url_patterns: File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 401, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python3.7/dist-packages/django/core/urlresolvers.py", line 395, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/usr/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/pi/hrss/hrss/urls.py", line 17, in <module> from django.urls import path ModuleNotFoundError: No module named 'django.urls' [22/Jul/2020 16:20:27] "GET /favicon.ico HTTP/1.1" 500 104957
Author

pip install -U django

seems to have fixed the issue

pip install -U django seems to have fixed the issue
Ghost closed this issue 2020-07-22 18:47:17 +02:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hipstercat/hrss#7
No description provided.