Unable to fetch Movies

After Editing db.py, my run.py is running but with hell lot of errors!
When I open in the browser, the page shows “Unable to fetch Movies” :roll_eyes:
Errors in terminal:

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 229-892-055
127.0.0.1 - - [18/Oct/2018 10:22:49] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [18/Oct/2018 10:22:49] "GET /service-worker.js HTTP/1.1" 200 -
127.0.0.1 - - [18/Oct/2018 10:22:49] "GET /api/v1/movies/ HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/vishal/Documents/MongoDB/M220_MongoDB_for_Python/mflix-python/mflix/api/movies.py", line 26, in api_get_movies
    None, page=0, movies_per_page=MOVIES_PER_PAGE)
  File "/home/vishal/Documents/MongoDB/M220_MongoDB_for_Python/mflix-python/mflix/db.py", line 218, in get_movies
    cursor = db.movies.find(query).sort(sort)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/werkzeug/local.py", line 306, in _get_current_object
    return self.__local()
  File "/home/vishal/Documents/MongoDB/M220_MongoDB_for_Python/mflix-python/mflix/db.py", line 46, in get_db
    MFLIX_DB_URI,
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/pymongo/mongo_client.py", line 494, in __init__
    res = uri_parser.parse_uri(entity, port, warn=True)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/pymongo/uri_parser.py", line 390, in parse_uri
    nodes = split_hosts(hosts, default_port=None)
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/pymongo/uri_parser.py", line 260, in split_hosts
    nodes.append(parse_host(entity, port))
  File "/home/vishal/anaconda3/lib/python3.7/site-packages/pymongo/uri_parser.py", line 155, in parse_host
    % (port,))
ValueError: Port must be an integer between 0 and 65535:

Help! Only 19:00 Hrs left to complete.

Upadate: It’s solved and now I am ready to go! I has a simple error in the .ini file which I fixed!

what was the error?,I am also facing same error kindly help how should i resolve.Thank you

I didn’t replace the previous string where we had to paste the SRV string to our cluster.