title: 500 Internal Server Error when trying to connect through Postman Using PyCharm
body: <p>Hi I am trying to test my connection to my database on my local drive for a personal project I am working on. I am trying to get better with python and MongoDB. Every time I try to test my connection using postman I am getting a 500 internal error. I double checked my URI = mongodb://127.0.0.1:27017 like majority local. I even uninstalled and reinstalled mongoDB. Any advice or solutions would be highly helpful. In my PyCharm IDE I have my database file</p>
  
  <pre><code>import pymongo
  
  __author__ = 'jslvtr'
  
  class Database(object):
  URI = "mongodb://127.0.0.1:27017"
  DATABASE = None
  
  @staticmethod
  def initialize():
      client = pymongo.MongoClient(Database.URI)
      Database.DATABASE = client['fullstack']
  
  @staticmethod
  def insert(collection, data):
      Database.DATABASE[collection].insert(data)
  
  @staticmethod
  def find(collection, query):
      return Database.DATABASE[collection].find(query)
  
  @staticmethod
  def find_one(collection, query):
      return Database.DATABASE[collection].find_one(query)
  </code></pre>
  
  <p>Here is my app file:</p>
  
  <pre><code>from flask import Flask
  from src.common.database import Database
  
  __author__ = 'jslvtr'
  
  app = Flask(__name__)
  app.config.from_object('config')
  app.secret_key ='123'
  
  
  @app.before_first_request
  def init_db():
      Database.initialize()
  
  
  from src.models.users.views import user_blueprint
  app.register_blueprint(user_blueprint, url_prefix="/users")
  </code></pre>
  
  <p>Here is my config file:</p>
  
  <pre><code>__author__ = 'jslvtr'
  
  
  DEBUG = True
  ADMINS = frozenset([
      "christopher.jxxxx@gmail.com"
  ])
  </code></pre>
  
  <p>This is the error I keep receiving:
  DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
  500 Internal Server Error
  Internal Server Error
  The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>