Closed narenpop closed 2 years ago
Describe the problem
Tell us about the problem you're having.
I was trying to install djangorestframewok and i installed it then i had an issue running the server have attached the image file
(localdev-EUbEEbsi) C:\Users\ASUS\Desktop\localdev\ecom>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\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "c:\users\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 870, in run self._target(*self._args, *self._kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, **kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run self.check(display_num_errors=True) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = checks.run_checks( File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\urls.py", line 101, in check_url_settings if value and not value.endswith('/'): AttributeError: 'tuple' object has no attribute 'endswith'
Steps to reproduce
Tell us how to reproduce it.
System configuration
- Django version:
- Python version:3.8.5
- Django-Constance version:
I'm having the same issue, have u been able to fix it? If yes, how did you make it? /Int ^^
Same as mine
getting same error but didn't get any solution yet. :-(
same as mine
same as mine can anyone help please
"same as mine"
Doesn't help to understand your issue at all. Why do you think that the problem is with this library? There is no one mention of django-constance in stacktrace.
For those who are facing a similar problem and land on this page.
Go to your settings.py and make sure you have a coma at the end of each lines in your installed apps, Middleware etc...
Worked for me
If you have this problem, go to the settings.py
file, and check for comas and if rest_framework
is correctly spelled.
@vbonh can you please elaborate more. Facing same problem
@AkshatPatel07 Are you able to solve this error?
same as mine
@AkshatPatel07 Are you able to solve this error?
Yess
Python manage.py migrate
I solved the problem by just installing required packages.
On Fri, 10 Jun 2022, 11:52 am Aj.weerachai, @.***> wrote:
same as mine can anyone help please
— Reply to this email directly, view it on GitHub https://github.com/jazzband/django-constance/issues/419#issuecomment-1152032195, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQQUSWNMSGVQYXXWWBNJ43VOLQ4VANCNFSM4QO6HPRA . You are receiving this because you commented.Message ID: @.***>
I was also facing the same issue. Check for the database which you are using is installed or not and if you are not using any databases, then go to settings.py and comment out the Database section DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } }
This will resolve the issue
I ran cmd as administrator and everything worked.
same issue for me and i have checked the settings.py it was perfect
Having working on windows and when i take my app to linux, I have that issue.. everything works file on windows but when I pull it from windows to linux and run any manage.py command I have the same issue you raised on this.. any ideas ?
I was having the same issue. I solved it by just changing the python interpreter. Worked for me ✔.
check the setting configration (stting.py) file
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64qbz5n2kfra8p0\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64qbz5n2kfra8p0\lib\threading.py", line 870, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(args, **kwargs)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\core\management\base.py", line 396, in check
databases=databases,
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\core\checks\registry.py", line 70, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\urls\resolvers.py", line 408, in check
for pattern in self.url_patterns:
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\urls\resolvers.py", line 589, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\Z\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\django\urls\resolvers.py", line 582, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64qbz5n2kfra8p0\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
PS C:\Users\Usuario\OneDrive\Escritorio\libreria\sistema> 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\Usuario\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(args, **kwargs)
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 485, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py", line 494, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\importlib__init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
Alguien sabe por que me aparece este error
For me solved as below: pip unistall djangorestframework pip install djangorestframework that's all
Describe the problem
Tell us about the problem you're having.
I was trying to install djangorestframewok and i installed it then i had an issue running the server have attached the image file
(localdev-EUbEEbsi) C:\Users\ASUS\Desktop\localdev\ecom>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\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "c:\users\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 870, in run self._target(*self._args, *self._kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, **kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run self.check(display_num_errors=True) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = checks.run_checks( File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\urls.py", line 101, in check_url_settings if value and not value.endswith('/'): AttributeError: 'tuple' object has no attribute 'endswith'
Steps to reproduce
Tell us how to reproduce it.
System configuration
- Django version:
- Python version:3.8.5
- Django-Constance version:
I went to an earlier local version in vscode (undo on the recently deleted file)... which I am guess threw off this
"Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs)"
Checked my settings.py but don't notice anything unusual
i updated the pip using command "python.exe -m pip install --upgrade pip" and then reinstalled django
Watching for file changes with StatReloader Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(args, **kwargs)
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\core\management\base.py", line 486, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\urls\resolvers.py", line 519, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\utils\functional.py", line 47, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\urls\resolvers.py", line 738, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\utils\functional.py", line 47, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Atharva\Desktop\PBL-SE\backend\Lib\site-packages\django\urls\resolvers.py", line 731, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\importlib__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
File "
I am getting this error please someone help...
hey i have the same issue , did you solve it?
i updated the pip using command "python.exe -m pip install --upgrade pip" and then reinstalled Django.. and my Django is properly working.
Describe the problem
Tell us about the problem you're having.
I was trying to install djangorestframewok and i installed it then i had an issue running the server have attached the image file
(localdev-EUbEEbsi) C:\Users\ASUS\Desktop\localdev\ecom>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\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "c:\users\asus\appdata\local\programs\python\python38-32\lib\threading.py", line 870, in run self._target(*self._args, *self._kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, **kwargs) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run self.check(display_num_errors=True) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = checks.run_checks( File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "C:\Users\ASUS.virtualenvs\localdev-EUbEEbsi\lib\site-packages\django\core\checks\urls.py", line 101, in check_url_settings if value and not value.endswith('/'): AttributeError: 'tuple' object has no attribute 'endswith'
Steps to reproduce
Tell us how to reproduce it.
System configuration