title: Module not detected when code run from wsgi.py but detected when run from main.py
body: <p>I am trying to push my flask app to Heroku using this <a href="https://www.geeksforgeeks.org/deploy-python-flask-app-on-heroku/" rel="nofollow noreferrer">tutorial</a>. When I run it from main.py which is in the app folder, my program works. But since I have an app folder, for Heroku I need another file outside the app to run that program. However, when I use wsgi.py to run the program instead, I get an error stating that converting module is not detected.</p>
  <p>wsgi.py code and output from running here:</p>
  <pre><code>from app.main import *
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\mpari\Documents\GitHub\Morse-Code-Translator\wsgi.py&quot;, line 1, in &lt;module&gt;
      from app.main import *
    File &quot;C:\Users\mpari\Documents\GitHub\Morse-Code-Translator\app\main.py&quot;, line 4, in &lt;module&gt;
      from converting import *
  ModuleNotFoundError: No module named 'converting'
  </code></pre>
  <p>If I run it from main, then my code works fine. Main is also where my flask app is.</p>
  <pre><code> * Serving Flask app &quot;main&quot; (lazy loading)
   * Environment: production
     WARNING: This is a development server. Do not use it in a production deployment.
     Use a production WSGI server instead.
   * Debug mode: off
   * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/zGeaX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zGeaX.png" alt="Project Structure #1" /></a></p>
  <p><a href="https://i.stack.imgur.com/X88I1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X88I1.png" alt="Project Structure #2" /></a></p>