On March 19, 2020 1:18:40 AM CDT, Eddie Nash <eddiemikeynash@gmail.com> wrote:
I am going through the tutorial yet when I check to see if it is working, I get this error code. Please help me fix this!Exception in thread django-main-thread:Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_innerself.run()File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in runself._target(*self._args, **self._kwargs)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapperfn(*args, **kwargs)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_runself.check(display_num_errors=True)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/base.py", line 392, in checkall_issues = self._run_checks(File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/base.py", line 382, in _run_checksreturn checks.run_checks(**kwargs)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checksnew_errors = check(app_configs=app_configs)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_uniqueall_namespaces = _load_all_namespaces(resolver)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespacesurl_patterns = getattr(resolver, 'url_patterns', [])File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__res = instance.__dict__[self.name] = self.func(instance)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/resolvers.py", line 588, in url_patternspatterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__res = instance.__dict__[self.name] = self.func(instance)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/resolvers.py", line 581, in urlconf_modulereturn import_module(self.urlconf_name)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, inimport_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1014, in _gcd_importFile "<frozen importlib._bootstrap>", line 991, in _find_and_loadFile "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 671, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 783, in exec_moduleFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removedFile "/Users/michellenash/Desktop/Eddie/github/mysite/mysite/urls.py", line 20, in <module>path('polls/', include('polls.urls')),File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/conf.py", line 34, in includeurlconf_module = import_module(urlconf_module)File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, inimport_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1014, in _gcd_importFile "<frozen importlib._bootstrap>", line 991, in _find_and_loadFile "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 671, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 779, in exec_moduleFile "<frozen importlib._bootstrap_external>", line 916, in get_codeFile "<frozen importlib._bootstrap_external>", line 846, in source_to_codeFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removedFile "/Users/michellenash/Desktop/Eddie/github/mysite/polls/urls.py", line 6path('', views.index, name'index')^SyntaxError: invalid syntax
Guessing that you're missing an "=" ...
ReplyDeletepath('', views.index, name='index')