Routing is set but error shows there are no handlers in your code for the route specified in your health check path

Greetings again…! I’m Samuel and this is my first time attempting to deploy my flask app (dm for the github repo). The routing is set but error shows there are no handlers in my code for the route specified in my health check path. The deployment succeeds but it’s returning a 404 error at the backend and “Not found…” at the front end. Could my routing be wrong in the code, or could it be that (“This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.”) I should be using a production server ie. gunicorn? I’ll appreciate help navigating this process. Thanks a bunch!

My Routing
@app.route(‘/’,methods=[‘GET’,‘POST’])
def yo():
return render_template(‘chatbot/templates/main.html’)

@app.route(‘/chat’,methods=[‘GET’,‘POST’])
def home():
return render_template(‘chatbot/templates/index.html’)

@app.errorhandler(404)
def page_not_found(e):
# note that we set the 404 status explicitly
return render_template(‘chatbot/templates/404.html’), 404

Logs
Oct 22 12:19:32 PM 2023-10-22 11:19:32.312847: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2199570000 Hz
Oct 22 12:19:32 PM 2023-10-22 11:19:32.315664: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560ca2f31340 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
Oct 22 12:19:32 PM 2023-10-22 11:19:32.315730: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Oct 22 12:19:34 PM * Serving Flask app “chatbot.init” (lazy loading)
Oct 22 12:19:34 PM * Environment: production
Oct 22 12:19:34 PM WARNING: This is a development server. Do not use it in a production deployment.
Oct 22 12:19:34 PM Use a production WSGI server instead.
Oct 22 12:19:34 PM * Debug mode: off
Oct 22 12:19:34 PM * Running on all addresses.
Oct 22 12:19:34 PM WARNING: This is a development server. Do not use it in a production deployment.
Oct 22 12:19:34 PM * Running on http://10.214.238.129:10000/ (Press CTRL+C to quit)
Oct 22 12:19:42 PM ==> Detected service running on port 10000
Oct 22 12:19:42 PM ==> Docs on specifying a port: Web Services | Render Docs
Oct 22 12:19:42 PM 10.213.22.134 - - [22/Oct/2023 11:19:42] “GET /health HTTP/1.1” 404 -
Oct 22 12:19:52 PM 10.213.22.134 - - [22/Oct/2023 11:19:52] “GET /health HTTP/1.1” 404 -
Oct 22 12:20:02 PM 10.213.22.134 - - [22/Oct/2023 11:20:02] “GET /health HTTP/1.1” 404 -

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.