project ph
project ph

Reputation: 1

I tried to run my django project and it shows the following error

(venv) PS C:\Users\User\OneDrive\Desktop\student-management-using-django-main> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1282, in request
     self._send_request(method, url, body, headers, encode_chunked)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1328, in _send_request
     self.endheaders(body, encode_chunked=encode_chunked)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1277, in endheaders
     self._send_output(message_body, encode_chunked=encode_chunked)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1037, in _send_output
     self.send(msg)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 975, in send
     self.connect()
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 941, in connect
     self.sock = self._create_connection(
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\socket.py", line 845, in create_connection
     raise err
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\socket.py", line 833, in create_connection
     sock.connect(sa)
    TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection f
ailed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
   self.run()
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
   self._target(*self._args, **self._kwargs)
  File "D:\student-management-using-django-main\venv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
      fn(*args, **kwargs)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
      self.check(display_num_errors=True)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\core\management\base.py", line 392, in check
      all_issues = checks.run_checks(
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks
      new_errors = check(app_configs=app_configs, databases=databases)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
      return check_method()
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\urls\resolvers.py", line 408, in check
      for pattern in self.url_patterns:
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\urls\resolvers.py", line 589, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\urls\resolvers.py", line 582, in urlconf_module
      return import_module(self.urlconf_name)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "C:\Users\User\OneDrive\Desktop\student-management-using-django-                  main\student_management_system\urls.py", line 22, in <module>
      path("", include('main_app.urls')),
    File "D:\student-management-using-django-main\venv\lib\site-packages\django\urls\conf.py", line 34, in include
      urlconf_module = import_module(urlconf_module)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "C:\Users\User\OneDrive\Desktop\student-management-using-django-main\main_app\urls.py", line 6, in <module>
      from . import hod_views, staff_views, student_views, views
    File "C:\Users\User\OneDrive\Desktop\student-management-using-django-      main\main_app\staff_views.py", line 10, in <module>
      from .detection import FaceRecognition
    File "C:\Users\User\OneDrive\Desktop\student-management-using-django-main\main_app\detection.py", line 88, in <module>
      students_present = fr.run_recognition()
    File "C:\Users\User\OneDrive\Desktop\student-management-using-django-main\main_app\detection.py", line 47, in run_recognition
      img_resp = urllib.request.urlopen(url)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen
      return opener.open(url, data, timeout)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 519, in open
      response = self._open(req, data)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 536, in _open
      result = self._call_chain(self.handle_open, protocol, protocol +
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 496, in _call_chain
      result = func(*args)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1377, in http_open
      return self.do_open(http.client.HTTPConnection, req)
    File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1351, in do_open
      raise URLError(err)
  urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the                         connected party did not properly respond after a period of time, or 
  established connection failed because connected host has failed to respond>

Upvotes: 0

Views: 119

Answers (0)

Related Questions