1#raise keyerror(key) from none os.environ
2# Move over while creating .env file first time you will get this error.To resolve this error.
3Open your .env file it's contains key value pairs in it.
4if it contains space after Key then remove that space from it.
5Ex:
6DATABASE_URL =postgres://127.0.0.1:5432/my_db_name
7 changed to(hear removed space after DATABASE_URL)
8DATABASE_URL=postgres://127.0.0.1:5432/my_db_name
9 More over it's accures for this reason. No your problem will solved.