Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

decouple is giving me problems. #64

Open
CharlieNuz6 opened this issue Jul 24, 2024 · 1 comment
Open

decouple is giving me problems. #64

CharlieNuz6 opened this issue Jul 24, 2024 · 1 comment

Comments

@CharlieNuz6
Copy link

$ python manage.py runserver
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 74, in execute
super().execute(*args, **options)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 81, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 89, in getattr
self._setup(name)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 76, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 190, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data/data/com.termux/files/home/django-lms/config/settings.py", line 14, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (/data/data/com.termux/files/usr/lib/python3.11/site-packages/decouple/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/home/django-lms/manage.py", line 21, in
main()
File "/data/data/com.termux/files/home/django-lms/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/core/management/base.py", line 426, in run_from_argv
connections.close_all()
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/connection.py", line 84, in close_all
for conn in self.all(initialized_only=True):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/connection.py", line 76, in all
return [
^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/connection.py", line 73, in iter
return iter(self.settings)
^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/functional.py", line 47, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/connection.py", line 45, in settings
self._settings = self.configure_settings(self._settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/db/utils.py", line 148, in configure_settings
databases = super().configure_settings(databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/connection.py", line 50, in configure_settings
settings = getattr(django_settings, self.settings_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 89, in getattr
self._setup(name)
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 76, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/conf/init.py", line 190, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data/data/com.termux/files/home/django-lms/config/settings.py", line 14, in
from decouple import config
ImportError: cannot import name 'config' from 'decouple' (/data/data/com.termux/files/usr/lib/python3.11/site-packages/decouple/init.py)

@adilmohak
Copy link
Owner

@CharlieNuz6 Did you find a solution? If not make sure you installed all requirements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants