ModuleNotFoundError: No module named 'jet' - python

im trying to run a project at https://github.com/VladKha/MovieNet
but i keep getting the error even after pip install jet multiple times
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\rajan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "C:\Users\rajan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, **self._kwargs)
File "C:\Users\rajan\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(*args, **kwargs)
File "C:\Users\rajan\venv\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run autoreload.raise_last_exception()
File "C:\Users\rajan\venv\lib\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception raise _exception[1]
File "C:\Users\rajan\venv\lib\site-packages\django\core\management_init_.py", line 398, in execute autoreload.check_errors(django.setup)()
File "C:\Users\rajan\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(*args, **kwargs)
File "C:\Users\rajan\venv\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\rajan\venv\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\rajan\venv\lib\site-packages\django\apps\config.py", line 228, in create
import_module(entry)
File "C:\Users\rajan\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jet'

Today I ran into the same problem. For met the following pip install did the trick: pip install django-jet.

Related

Windows: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient?

In my Windows10 ,
I have installed mysqlclient in my venv ( I checked the path venv\Lib\sitepackages found mysqlclient-1.4.6.dist-info\).
however, when I use command to runserver:
>python3 manage.py runserver
get Did you install mysqlclient? error,
details:
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\backends\mysql\base.py", line 15, in <module>
import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py", line 109,
in inner_run
autoreload.raise_last_exception()
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py", line 77, in raise_last_excep
tion
raise _exception[1]
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\apps\config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\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 "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models\base.py", line 117, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models\base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models\options.py", line 204, in contribute_to_
class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\__init__.py", line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\utils.py", line 201, in __getitem__
backend = load_backend(db['ENGINE'])
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Users\80361576\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\backends\mysql\base.py", line 20, in <module>
) from err
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
environment version:
Windows 10
Python 3.7.8
Django 2.2.12
mysqlclient 1.4.6

connection error between two devices: ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory

I have two devices that I use as MySql server and Django server. My system, which works on my development device, becomes inoperable when it switches to other devices. Settings on 192.168.3.60:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'bildirdi_hurmalar',
'USER': 'gungelir_tirmalar',
'PASSWORD': 'EhuEhu_1793',
'HOST': '192.168.3.65',
'PORT': '3306',
}
}
Apache2 and wsgi on mainside.
Error when I run Migrate or runserver:
(env) pi#raspberrypi:~/bilidrdi.com $ python manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_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/bilidrdi.com/env/lib/python3.7/site-packages/django/contrib/auth/models.py", line 3, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 48, in <module>
class AbstractBaseUser(models.Model):
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/models/base.py", line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/models/base.py", line 326, in add_to_class
value.contribute_to_class(cls, name)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/models/options.py", line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/utils/connection.py", line 15, in __getattr__
return getattr(self._connections[self._alias], item)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/utils/connection.py", line 62, in __getitem__
conn = self.create_connection(alias)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/utils.py", line 204, in create_connection
backend = load_backend(db['ENGINE'])
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/utils.py", line 111, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
import MySQLdb as Database
File "/home/pi/bilidrdi.com/env/lib/python3.7/site-packages/MySQLdb/__init__.py", line 24, in <module>
version_info, _mysql.version_info, _mysql.__file__
NameError: name '_mysql' is not defined
Requirements:
asgiref==3.4.1
Django==3.2.5
django-bootstrap-form==3.4
django-post-office==3.5.3
jsonfield==3.1.0
mysql-client==0.0.1
mysqlclient==2.0.3
nano==0.10.0
Pillow==8.3.1
pkg-resources==0.0.0
pytz==2021.1
sqlparse==0.4.1
typing-extensions==3.10.0.0
192.1683.65 is dedicated server on debian.
Try to install libmariadbclient-dev:
sudo apt install libmariadbclient-dev
limbariadbclient-dev does not exist to my mind. I had the same problem and
sudo apt-get install -y libmariadb-dev worked.

Runserver trouble with debugtools

all!
I have recent download source of python project and run server :
python manage.py runserver
but it shows error
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/core/management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/Users/kata/Library/Python/3.7/lib/python/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/Library/Frameworks/Python.framework/Versions/3.7/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 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'debugtools'
Next, i run install module :
pip install debugtools
Install success.
But, it still error on runserver.
I took all day to research about this but it has not solution.
Please help me how to fix it ! Many thanks all!

Django projects with Postgres stopped working after brew install

I was trying to get Selenium to work, and so followed the suggestion here to brew install geckodriver in the relevant virtual environment (pipenv). After having done that, my other virtual environments stopped working.
I was able to get most of them to work again by re-installing pipenv outside of any virtual environment (using pip3 install pipenv).
But all of my Django projects that rely on Postgres still don't work: I'm able to start their virtual environment (with pipenv shell), but python manage.py runserver gives me the following traceback:
Watching for file changes with StatReloader
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/opt/python#3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/opt/python#3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[0](_exception[1]).with_traceback(_exception[2])
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/opt/python#3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/models/base.py", line 117, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/models/base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/models/options.py", line 204, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/__init__.py", line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/utils.py", line 201, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/local/opt/python#3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 24, in <module>
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib
Reason: image not found
Traceback (most recent call last):
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/apps/registry.py", line 155, in get_app_config
return self.app_configs[app_label]
KeyError: 'admin'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 60, in execute
super().execute(*args, **options)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 95, in handle
self.run(**options)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 579, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 564, in start_django
reloader.run(django_main_thread)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/autoreload.py", line 272, in run
get_resolver().urlconf_module
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/urls/resolvers.py", line 564, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/opt/python#3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/my_last_name/Django/pred_market_pg_copy/pm_project/urls.py", line 7, in <module>
path('mp/', admin.site.urls),
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/utils/functional.py", line 256, in inner
self._setup()
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 529, in _setup
AdminSiteClass = import_string(apps.get_app_config('admin').default_site)
File "/Users/my_last_name/.local/share/virtualenvs/pred_market_pg_copy-ZXHemaJW/lib/python3.8/site-packages/django/apps/registry.py", line 162, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'admin'.
I have 'django.contrib.admin' among my INSTALLED_APPS. And, again, everything was working just fine prior to my geckodriver adventure.
Re-installing psycopg2 with pipenv install psycopg2 doesn't solve it. I've also tried uninstalling psycopg2, but when I then try to install it again, I get Locking Failed.
Any advice here on what's going on would be appreciated.

LookupError: No installed app with label "admin"

So I'm trying to run my development server using the command "python manage.py runserver"
But whenever I try to run it, it gives me this error;
Watching for file changes with StatReloader
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 77, in raise_last_exception
raise _exception[0](_exception[1]).with_traceback(_exception[2])
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\config.py", line 90, in create
module = import_module(entry)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 125, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_countries'
Traceback (most recent call last):
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 155, in get_app_config
return self.app_configs[app_label]
KeyError: 'admin'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute
super().execute(*args, **options)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", line 95, in handle
self.run(**options)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 579, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 564, in start_django
reloader.run(django_main_thread)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 272, in run
get_resolver().urlconf_module
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py", line 564, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 125, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "F:\Users\Kasutaja\Documents\Veebipood v4\django-ecommerce\djecommerce\urls.py",
line 6, in <module>
path('admin/', admin.site.urls),
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py", line 256, in inner
self._setup()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\contrib\admin\sites.py", line 529, in _setup
AdminSiteClass = import_string(apps.get_app_config('admin').default_site)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 162, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'admin'.
I have tried searching for solutions to this problem but nothing seems to be working. There seems to also be a weird issue with django-countries. Whenever I try installing it, it says;
Collecting django-countries
Using cached django-countries-6.0.tar.gz (617 kB)
WARNING: Generating metadata for package django-countries produced metadata for project name unknown. Fix your #egg=django-countries fragments.
Requirement already satisfied (use --upgrade to upgrade): unknown from https://files.pythonhosted.org/packages/6d/7a/4046a82f6f0c7d00ad24b3a4fc30d10c562949bb6cd40ef7f3051ed7e2bc/django-countries-6.0.tar.gz#sha256=cca351f304d18187b6200e1aae381c2902045c33aea5f4da58fd74685b7cd4fc in c:\users\kasutaja\appdata\local\programs\python\python36-32\lib\site-packages
The weird thing with this is, that whenever I try to run "python manage.py makemigrations", it says;
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 357, in execute
django.setup()
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\config.py", line 90, in create
module = import_module(entry)
File "C:\Users\Kasutaja\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 125, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_countries'
Does anyone know how to fix this?
Thanks in advance,
Nimetu.
Ok, figured it out. Just putting this out there just incase anyone has the same issue. If your project has a requirements.txt file (if it doesn't make one) and add (If you want to use django-countries)
django-countries==5.3.3
To it, you can also use the latest version but I chose to use version 5.3.3 in this case. After that run the command
pip install -r requirements.txt

Categories