Run.py not able to execute

Trying to execute run.py with .ini file as:

Ticket: Connection

Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@

[TEST]
SECRET_KEY = super_secret_testing_key
MFLIX_DB_URI = # Ticket: Connection

Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-xxxx.mongodb.net

[TEST]
SECRET_KEY = super_secret_testing_key
MFLIX_DB_URI = our_testing_db_uri (can be the same as Atlas, or a local MongoDB database)

But receiving error as
configparser.DuplicateSectionError: While reading from ‘D:\xxxx\Knowledge\MongoDB\M220P\mflix-python\.ini’ [line 15]: section ‘PROD’ already exists

Please help

Hi Sukriti,

It looks like the error relates to the configuration file “.ini” and it having two ‘PROD’ sections in the file. The configuration file should only have two sections, ‘TEST’ and ‘PROD’.

Can you double check the .ini file to see if it has those two sections ?
Hope this helps!
Eoin

Thanks for suggestion.

It was a typo from my end such that 'PROD ’ was written two times.
Its resolved now.