Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Error : 'Secret Key' #490

Open
Stanislavnba opened this issue Oct 19, 2022 · 3 comments
Open

Key Error : 'Secret Key' #490

Stanislavnba opened this issue Oct 19, 2022 · 3 comments

Comments

@Stanislavnba
Copy link

Stanislavnba commented Oct 19, 2022

Hello, I tried to run the CRM. Downloaded it all.
installed the requirements.txt in both the file directory and in the virtualenv.
I cant run the server thou.
When I try to run it this shows up.
File "C:\Users\stani\OneDrive\Desktop\Ladyfit Site\Django-CRM-master\crm\settings.py", line 12, in
SECRET_KEY = os.environ["SECRET_KEY"]
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'SECRET_KEY'

I searched for this and I dont have .pyc files to delete. I fixed the dotenv import issue and it still doesnt work.
Any ideas ?

@Stanislavnba
Copy link
Author

I kind of fixed it. Everything that is called from the env.md file cannot be called for some reason. So I just replaced it in the settings.py. But now i have a error 404 when I run the server. So I will try and figure this out now. Do I need some files or data in the DB before I start the server?

@zoal97
Copy link

zoal97 commented Nov 27, 2022

because lib dontenv

just

linux = mv env.md .env
win = rename env.md to .env

@shaikhmudassir
Copy link
Contributor

Just copy paste the env.md into .env file.
Now project has lots of changes. Please update your repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants