System specs: Windows 10, Anaconda, Python 3.8.5
I have referred to the following tickets:
https://www.mongodb.com/community/forums/t/keyerror-prod-starting-the-mflix/93616/3
https://www.mongodb.com/community/forums/t/run-py-not-working/95322
These are the contents of my dotini_win file which I renamed to .ini:
[PROD]
SECRET_KEY = MYSECRETKEY
MFLIX_DB_URI = mongodb+srv://myuername:mypassword@cluster0.5cpvmqf.mongodb.net/sample_mflix
MFLIX_NS = sample_mflix
[TEST]
SECRET_KEY = MYSECRETKEY
MFLIX_DB_URI = mongodb+srv://myuername:mypassword@cluster0.5cpvmqf.mongodb.net/sample_mflix
MFLIX_NS = sample_mflix
After having set up my virtual environment and finished installing the requirements, I ran the command python run.py but get the following error:
Traceback (most recent call last):
File "run.py", line 13, in <module>
app.config['MFLIX_DB_URI'] = config['PROD']['MFLIX_DB_URI']
File "C:\Users\Username\anaconda3\lib\configparser.py", line 960, in __getitem__
raise KeyError(key)
KeyError: 'PROD'
Please advise as I can’t seem to get past this.