2
respostas

Servidor não ativa

Olá, consegui ativar a pasta "venv", mas quando rodo "python manage.py runserver" o servidor não ativa e aparece a mensagem:

(venv) PS C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura> 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\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\urls\resolvers.py", line 717, in url_patterns iter(patterns) TypeError: 'module' object is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run self.check(display_num_errors=True) File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\core\management\base.py", line 485, in check all_issues = checks.run_checks( ^^^^^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\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\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config return check_resolver(resolver) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver return check_method() ^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\urls\resolvers.py", line 495, in check messages.extend(check_resolver(pattern)) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver return check_method() ^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\urls\resolvers.py", line 494, in check for pattern in self.url_patterns: ^^^^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\utils\functional.py", line 57, in get res = instance.dict[self.name] = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\venv\Lib\site-packages\django\urls\resolvers.py", line 725, in url_patterns raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'galeria.urls' from 'C:\Users\Auditoria - Gleison\Desktop\Projeto_Alura\galeria\urls.py'>' does not appear to have any patterns in it. If you see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused by a circular import.

2 respostas

Estou tendo o mesmo problema

Estou passando por esse mesmo problema.