Using Visual Studio instead of Anaconda

Hi Team,

I do not want use Anaconda, is it possible that I can do the testing using Visual Studio software. If you can help me with initial environment setup in Visual Studio, I can do the rest.

Regards,
Raj Mishra

Hi Team,

I am asking help for M220P training MongoDB for Python Developer.

Also, Virtual Environment Installation is broken.

Thank you for help.

Regards,
Raj Mishra

Hi Team,

I tried to setup the environment in Visual Studio. It seems everything working properly except .ini file. In following file zzz is changed string. I am not sure from where I will get Secret_Key. If it API key than it should be provided, right? We should not generate it. In case I have to make the changes. Which all other places I have to add this please mention?

[PROD]
SECRET_KEY = super_secret_key_you_should_change
MFLIX_DB_URI = mongodb+srv://m001-student:m001-zzz@sandbox.zzz.mongodb.net/myFirstDatabase
MFLIX_NS = sample_mflix

[TEST]
SECRET_KEY = super_secret_testing_key
MFLIX_DB_URI = mongodb+srv://m001-student:m001-zzz@sandbox.zzz.mongodb.net/myFirstDatabase
MFLIX_NS = sample_mflix

Please note I am using same URI which I had used from previous course which was MongoDB basic. Kindly let me know if I have to reconfigure it.

Regards,
Raj Mishra

Hi Team,

Just wanted to check if I doing right thing: Using API Private Key which I created using following:
I generated API key by going to Organization in this case MDBU → Access Manager → Create API Key → Secret key used is Private Key. Then added my device to whitelist IP

Here is error I am getting:

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\rajkumar.mishra\AppData\Local\Programs\Python\Python37-32\lib\configparser.py", line 958, in __getitem__
    raise KeyError(key)
KeyError: 'PROD'

Kindly correct me.

Regards,
Raj Mishra

Indicates that your configuration file is not set correctly.

Hi Steeve,

Thanks for your reply. I checked it on other thread. I rectify my error.

Just for information for other users I rename the file dotini_win to dotini_win.ini instead just .ini. After changing the file name just to .ini it works.

Again thanks for your input. Hope other user find this entire thread useful and will not do same mistake I done :smiley:

Regards,
Raj Mishra