# ImproperlyConfigured("The SECRET\_KEY setting must not be empty.")

**URL:** <https://forum.djangoproject.com/t/improperlyconfigured-the-secret-key-setting-must-not-be-empty/4945>\
**Category:** Using Django\
**Created:** [October 25, 2020, 8:49am UTC](https://forum.djangoproject.com/t/improperlyconfigured-the-secret-key-setting-must-not-be-empty/4945 "2020-10-25T08:49:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sury072](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sury072](https://forum.djangoproject.com/u/sury072)\
**Post date:** [October 25, 2020, 8:49am UTC](https://forum.djangoproject.com/t/improperlyconfigured-the-secret-key-setting-must-not-be-empty/4945/1 "2020-10-25T08:49:14Z")

</div>

File “/opt/miniconda3/lib/python3.7/site-packages/django/conf/  
**init**.py”, line 196, in **init**  
raise ImproperlyConfigured(“The SECRET\_KEY setting must not  
be empty.”)  
django.core.exceptions.ImproperlyConfigured: The SECRET\_KEY sett  
ing must not be empty.

I am using an open source project on Git.  
I have created a ´random´Secret\_key as I expect you don’t leave your Secret:\_key , debug and Database on the git.

what i´ve done\_:  
I found the .env.md and entered the random Secret\_key in the Key Value as it says as was missing awaiting to be copied in.  
I ran run server but it still says the same error.

the next things done:  
I found the in the Django/conf/global settings  
Entered there the Secret\_ key as key value as it was missing.

I ran the server but it still says the same error.

Can anyone advise or this supposed to be for a stack overflow question=

Thank you for your advise.

---

<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:** [October 25, 2020, 12:13pm UTC](https://forum.djangoproject.com/t/improperlyconfigured-the-secret-key-setting-must-not-be-empty/4945/2 "2020-10-25T12:13:06Z")

</div>

It might help if you tell us which Open Source project you’re trying to use.
