# error running server django

**URL:** <https://forum.djangoproject.com/t/error-running-server-django/34286>\
**Category:** Mystery Errors\
**Created:** [August 29, 2024, 8:26am UTC](https://forum.djangoproject.com/t/error-running-server-django/34286 "2024-08-29T08:26:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![0pangithub](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/0pangithub/32/23563_2.png) [@0pangithub](https://forum.djangoproject.com/u/0pangithub)\
**Post date:** [August 29, 2024, 8:26am UTC](https://forum.djangoproject.com/t/error-running-server-django/34286/1 "2024-08-29T08:26:11Z")

</div>

PS C:\Django\_Crud\my\_django\_app\> python manage.py runserver  
Watching for file changes with StatReloader  
Exception in thread django-main-thread:  
Traceback (most recent call last):  
File “C:\Program Files\Python312\Lib\threading.py”, line 1073, in \_bootstrap\_inner  
self.run()  
File “C:\Program Files\Python312\Lib\threading.py”, line 1010, in run  
self.\_target(\*self._args, \*\*self.kwargs)  
File “C:\Django\_Crud\env\Lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper  
fn(\*args, \*\*kwargs)  
File “C:\Django\_Crud\env\Lib\site-packages\django\core\management\commands\runserver.py”, line 126, in inner\_run  
autoreload.raise\_last\_exception()  
File “C:\Django\_Crud\env\Lib\site-packages\django\utils\autoreload.py”, line 87, in raise\_last\_exception  
raise exception[1]  
File "C:\Django\_Crud\env\Lib\site-packages\django\core\management\_init.py", line 394, in execute  
autoreload.check\_errors(django.setup)()  
File “C:\Django\_Crud\env\Lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper  
fn(\*args, \*\*kwargs)  
File "C:\Django\_Crud\env\Lib\site-packages\django\_init.py", line 24, in setup  
apps.populate(settings.INSTALLED\_APPS)  
File “C:\Django\_Crud\env\Lib\site-packages\django\apps\registry.py”, line 116, in populate  
app\_config.import\_models()  
File “C:\Django\_Crud\env\Lib\site-packages\django\apps\config.py”, line 269, in import\_models  
self.models\_module = import\_module(models\_module\_name)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File "C:\Program Files\Python312\Lib\importlib\_init_.py", line 90, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “”, line 1387, in \_gcd\_import  
File “”, line 1360, in \_find\_and\_load  
File “”, line 1331, in \_find\_and\_load\_unlocked  
File “”, line 935, in \_load\_unlocked  
File “”, line 991, in exec\_module  
File “”, line 1129, in get\_code  
File “”, line 1059, in source\_to\_code  
File “”, line 488, in \_call\_with\_frames\_removed  
SyntaxError: source code string cannot contain null bytes

---

<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 29, 2024, 11:57am UTC](https://forum.djangoproject.com/t/error-running-server-django/34286/2 "2024-08-29T11:57:06Z")

</div>

Welcome @0pangithub !

My first course of action any time I get a traceback is to take the message at face value.

You’re getting:

> [@0pangithub](#):
>
> SyntaxError: source code string cannot contain null bytes

I’d start by checking all the files in the project for null characters.
