[Closed] Chapter 1: Driver Setup README can't run run.py

I am user Virtualenv.
I have load data:

MongoDB Enterprise mflix-shard-0:PRIMARY> show dbs
admin  0.000GB
local  4.022GB
mflix  0.095GB
MongoDB Enterprise mflix-shard-0:PRIMARY> 

but run python3 run.py it show:

$ python3 run.py
Traceback (most recent call last):
  File "run.py", line 13, in <module>
    app.config['MFLIX_DB_URI'] = config['PROD']['MFLIX_DB_URI']
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 958, in __getitem__
    raise KeyError(key)
KeyError: 'PROD'
(mflix_venv) 

and the dotini_unix.ini:

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m220student:m220password@mflix-xxxxx.mongodb.net/test?retryWrites=true

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

my system is Mac os

ok, fixed.
should rename dotini_unix to .ini

1 Like

Glad you got it sorted out!

It’s a detail i missed as well :smiley: