Throwing error while running py run.py

(mflix) E:\MongoDB\mflix-python>py run.py
Traceback (most recent call last):
File “run.py”, line 13, in
app.config[‘MFLIX_DB_URI’] = config[‘PROD’][‘MFLIX_DB_URI’]
File “E:\Anakonda3\lib\configparser.py”, line 958, in getitem
raise KeyError(key)
KeyError: ‘PROD’

dotini_win.ini

[PROD]
SECRET_KEY = testkey
MFLIX_DB_URI = mongodb+srv://raja:raja@mflix-nqphy.mongodb.net/test
MFLIX_NS = sample_mflix

[TEST]
SECRET_KEY = testkey
MFLIX_DB_URI = mongodb+srv://raja:raja@mflix-nqphy.mongodb.net/testdatabase
MFLIX_NS = sample_mflix

please help me…not sure where its going wrong

You need to rename it to .ini file.

Kanika

thankyou got ur point

1 Like