Exception in thread django-main-thread Traceback

Question:

I am getting this error while trying to run a Django project. This happened when I cloned the project and run it for this first time, I am running it using a virtual environment

(env1) C:UsersChiamDesktopfypodyera>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:UsersChiamAppDataLocalProgramsPythonPython311Libthreading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:UsersChiamAppDataLocalProgramsPythonPython311Libthreading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangoutilsautoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangocoremanagementcommandsrunserver.py", line 134, in inner_run
    self.check(display_num_errors=True)
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangocoremanagementbase.py", line 475, in check
    all_issues = checks.run_checks(
                 ^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangocorechecksregistry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangocorechecksurls.py", line 42, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangocorechecksurls.py", line 61, in _load_all_namespaces
    url_patterns = getattr(resolver, "url_patterns", [])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangoutilsfunctional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangourlsresolvers.py", line 715, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
                       ^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangoutilsfunctional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamDesktopfypodyeraenv1Libsite-packagesdjangourlsresolvers.py", line 708, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:UsersChiamAppDataLocalProgramsPythonPython311Libimportlib__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  File "C:UsersChiamDesktopfypodyeraclientviews.py", line 3, in <module>
    import pyrebase
ModuleNotFoundError: No module named 'pyrebase'

Searched a lot on the internet but still couldn’t find the reason why this is happening

Asked By: YeeHang

||

Answers:

You are missing a package named pyrebase and its references have been used in your project. Install this package by the following instructions:

pip install pyrebase

or,

pip3 install pyrebase
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.