# runserver SyntaxError: invalid syntax

**URL:** <https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168>\
**Category:** Mystery Errors\
**Created:** [August 1, 2022, 7:20pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168 "2022-08-01T19:20:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fafoo-75](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/fafoo-75/32/9532_2.png) [@fafoo-75](https://forum.djangoproject.com/u/fafoo-75)\
**Post date:** [August 1, 2022, 7:20pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/1 "2022-08-01T19:20:37Z")

</div>

Hello to all,

I am currently encountering a problem when I type the runserver command I get an error. I looked on the forum and on other sites, but I could not solve the problem. It’s been 2 days that I’m blocked, if someone could help me, it would be really great ? thanks a lot

The error is as follows:

(walterenv) fafoo@faridchalal-dev:~/development/walter/walter$ python manage.py runserver 0.0.0.0:8000  
Watching for file changes with StatReloader  
Performing system checks…

Exception in thread django-main-thread:  
‘’‘Traceback (most recent call last):’‘’  
File “/usr/lib/python3.10/threading.py”, line 1009, in \_bootstrap\_inner  
self.run()  
File “/usr/lib/python3.10/threading.py”, line 946, in run  
self.\_target(\*self.\_args, \*\*self.\_kwargs)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/utils/autoreload.py”, line 64, in wrapper  
fn(\*args, \*\*kwargs)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/core/management/commands/runserver.py”, line 134, in inner\_run  
self.check(display\_num\_errors=True)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/core/management/base.py”, line 487, in check  
all\_issues = checks.run\_checks(  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/core/checks/registry.py”, line 88, in run\_checks  
new\_errors = check(app\_configs=app\_configs, databases=databases)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/core/checks/urls.py”, line 14, in check\_url\_config  
return check\_resolver(resolver)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/core/checks/urls.py”, line 24, in check\_resolver  
return check\_method()  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/urls/resolvers.py”, line 480, in check  
for pattern in self.url\_patterns:  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/utils/functional.py”, line 49, in **get**  
res = instance. **dict** [self.name] = self.func(instance)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/urls/resolvers.py”, line 696, in url\_patterns  
patterns = getattr(self.urlconf\_module, “urlpatterns”, self.urlconf\_module)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/utils/functional.py”, line 49, in **get**  
res = instance. **dict** [self.name] = self.func(instance)  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/urls/resolvers.py”, line 689, in urlconf\_module  
return import\_module(self.urlconf\_name)  
File “/usr/lib/python3.10/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 1006, in \_find\_and\_load\_unlocked  
File “”, line 688, in \_load\_unlocked  
File “”, line 883, in exec\_module  
File “”, line 241, in \_call\_with\_frames\_removed  
File “/home/fafoo/development/walter/walter/walter/urls.py”, line 21, in   
path(‘’, include(‘landing.urls’)),  
File “/home/fafoo/development/walter/walterenv/lib/python3.10/site-packages/django/urls/conf.py”, line 38, in include  
urlconf\_module = import\_module(urlconf\_module)  
File “/usr/lib/python3.10/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 1006, in \_find\_and\_load\_unlocked  
File “”, line 688, in \_load\_unlocked  
File “”, line 879, in exec\_module  
File “”, line 1017, in get\_code  
File “”, line 947, in source\_to\_code  
File “”, line 241, in \_call\_with\_frames\_removed  
File “/home/fafoo/development/walter/walter/landing/urls.py”, line 2  
from . Import views  
^^^^^‘’’  
SyntaxError: invalid syntax

---

<div class="post-metadata">

**Author:** ![leandrodesouzadev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/leandrodesouzadev/32/8981_2.png) [@leandrodesouzadev](https://forum.djangoproject.com/u/leandrodesouzadev)\
**Post date:** [August 1, 2022, 8:02pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/2 "2022-08-01T20:02:40Z")

</div>

Hey there

> [@fafoo-75](#):
>
> File “/home/fafoo/development/walter/walter/landing/urls.py”, line 2  
> from . Import views

Did you mean `import` ?

---

<div class="post-metadata">

**Author:** ![fafoo-75](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/fafoo-75/32/9532_2.png) [@fafoo-75](https://forum.djangoproject.com/u/fafoo-75)\
**Post date:** [August 1, 2022, 8:32pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/3 "2022-08-01T20:32:05Z")

</div>

yes. here is my urls.py 's file

from django.urls import path  
from . import views

urlpatterns = [  
path(‘’, views.home, name=‘home’)  
]

---

<div class="post-metadata">

**Author:** ![leandrodesouzadev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/leandrodesouzadev/32/8981_2.png) [@leandrodesouzadev](https://forum.djangoproject.com/u/leandrodesouzadev)\
**Post date:** [August 2, 2022, 10:39am UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/4 "2022-08-02T10:39:38Z")

</div>

Does that solved your issue?

---

<div class="post-metadata">

**Author:** ![fafoo-75](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/fafoo-75/32/9532_2.png) [@fafoo-75](https://forum.djangoproject.com/u/fafoo-75)\
**Post date:** [August 2, 2022, 12:44pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/5 "2022-08-02T12:44:11Z")

</div>

No i dont solve the probleme

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 2, 2022, 12:49pm UTC](https://forum.djangoproject.com/t/runserver-syntaxerror-invalid-syntax/15168/6 "2022-08-02T12:49:44Z")

</div>

Please post a new traceback of the problem you’re currently encountering.

When you copy/paste code, templates, tracebacks, etc here, enclose them _between_ lines of three backtick - ` characters. This means you’ll have a line of ```, then the traceback (or code or whatever), then another line of ```. This forces the forum software to keep it all properly formatted. (The lines of ``` must be lines by themselves.)
