title: Python - Error importing class from another file
body: <p>Can anyone guide on resolving the error ? The manager class method will need capability to create instance of User Class but it is not finding the module</p>
  
  <p>Below is the folder structure and code and other details. <strong>init</strong>.py file is empty</p>
  
  <pre><code>Internal folder   
    -&gt;main.py
    -&gt;__init__.py
    -&gt;User Folder
       -&gt; user.py
       -&gt; models.py
       -&gt; usermanager.py
       -&gt; __init__.py
  
  
  
  ModuleNotFoundError: No module named 'models'
    at &lt;module&gt; (/home/vmagent/app/internal/user/usermanager.py:4)
    at &lt;module&gt; (/home/vmagent/app/main.py:2)
    at import_app (/env/lib/python3.6/site-packages/gunicorn/util.py:352)
    at load_wsgiapp (/env/lib/python3.6/site- 
      packages/gunicorn/app/wsgiapp.py:52)
    at load (/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py:65)
    at wsgi (/env/lib/python3.6/site-packages/gunicorn/app/base.py:67)
    at load_wsgi (/env/lib/python3.6/site- 
      packages/gunicorn/workers/base.py:135)
    at init_process (/env/lib/python3.6/site- 
      packages/gunicorn/workers/base.py:126)
    at spawn_worker (/env/lib/python3.6/site- 
      packages/gunicorn/arbiter.py:578)
  </code></pre>
  
  <p>main.py code </p>
  
  <pre><code>from internal.account import user,usermanager
  
  def registerBlueprint(app, blueprint, manager):
       blueprint.manager = manager
       app.register_blueprint(blueprint)
  
  registerBlueprint(app, user.request, usermanager)
  </code></pre>
  
  <p>user.py code    </p>
  
  <pre><code>request = Blueprint('flex.user', __name__)
  
  @request.route('/v1/user', methods=['POST'])
  def CreateAccount():
     test = request.manager.UserManager()
     return test.CreateUser()
  </code></pre>
  
  <p>usermanager.py</p>
  
  <pre><code>from models import User
  
  class UserManager:
  
     def __init__(self):
      pass
  
     def CreateUser(self):
        logger.log_text("AccountManger")
        data = json.dumps(dict(
          email="Hello@123.com",
          password="Test124"
         ))
         user = User(data)
         user.create()
         responseObject = dict(status='success', message='Successfully 
         registered.')
         return make_response(jsonify(responseObject)), 201
  </code></pre>