Run.py not working

Did you make any changes in the code? If yes, please revert back and then try again.

If not, then please share which python version you are using and if you have followed the setup instructions already.

Kanika

From the mflix environment, sharing the output of the code below will indicate this :arrow_heading_up::
conda list

I have not made any changes to code. python --version command shows 2.7.17. But I do have python3 installed.

Can you try running using python3?

Fyi, you’ve shown us the Python versions on your local machine, not the one in the virtual environment. Please share the output of the above code so that we can verify:

  1. The python version in the mflix env
  2. Whether all dependent packages were installed

Yes all packages were installed.

I have tried using python3 to run run.py

Got this error:
Traceback (most recent call last):
File “run.py”, line 13, in
app.config[‘MFLIX_DB_URI’] = config[‘PROD’][‘MFLIX_DB_URI’]
File “/usr/lib/python3.6/configparser.py”, line 959, in getitem
raise KeyError(key)
KeyError: ‘PROD’

I am not able to proceed in this course. Kindly help me out.

I have tried using python3 to run run.py

Got this error:
Traceback (most recent call last):
File “run.py”, line 13, in
app.config[‘MFLIX_DB_URI’] = config[‘PROD’][‘MFLIX_DB_URI’]
File “/usr/lib/python3.6/configparser.py”, line 959, in getitem
raise KeyError(key)
KeyError: ‘PROD’

I am not able to proceed in this course. Kindly help me out.

Please check your .ini file for indentation issues. Also, run the python run.py command from mflix-python directory only.

Kanika

I am doing the same thing as instructed, but i am facing same error/

Please check this link

You may get some clues.May be issue with your .ini file.What is the exact name of your file?

keyError ‘Prod’ starting the MFlix

1 Like

Yes there was issue with .ini file. Thanks a ton. Now when I’m running localhost:5000. I am getting page with error message ‘unable to fetch movies’.

Please search our forum.Couple of threads available for this issue
Check your console error logs,ini file for missing info/wrong info like connect strings/password etc

Below one from M220J but can give some clues

Unable to fetch movies in M220J

I have gone through this reference. Kindly help me out as I am unable to find the console log which has been mentioned in that reference. Thanks in advance.

You will find that in terminal/command line, where you must have run python run.py.

Kanika