ModuleNotFoundError: No module named 'app', not able to host on aserver

Viewed 14

I am running a flask project and trying to host it

ive removed my __init__.py file and added everything from my routes.py to my routes file to my app.py file. Its able to run locally on my computer but when i try to host it on railway(hosting service) it says no module named app

routes.py and __init__.py is empty

my file directory

my file directory

app.py

from flask import Flask, request, abort


app = Flask(__name__)

from flask import render_template
import pandas as pd
import json
import plotly
import plotly.express as px
import plotly.graph_objects as go


@app.route('/')
def index()
run.py


from application import app
import os


if __name__ == '__main__':
    app.run(debug=True, port=os.getenv("PORT", default=5000))
0 Answers
Related