My Project Randomly Won't Work Anymore. It says the "requested URL was not found on the server"!

My Flask project randomly stopped working. It says the “requested URL was not found on the server” and I can’t add anything to my website because of this!
Repl link: WorldCache on Replit

There are multiple issues with the app as is. There is no base path route configured, so when the app opens to “/“, the server returns 404, since there is no route to handle that path (that is the not found you see). Additionally, the project does not have a login.html file, and all of your flask routes are configured to render login.html

1 Like

As you can probably tell, I’m new to Flask, so it’s good to have someone I can run some questions through.
What is a base path route and how do I configure it?

1 Like

Welcome to the wonderful world of web servers :smile:

I’m out and about, but I would recommend familiarizing yourself with some of the general concepts of flask / serving web content by reading through a couple pages like this: Python | Introduction to Web development using Flask - GeeksforGeeks

Then explore a bit with your repl to work towards what you’re trying to achieve while learning the concepts at the same time.


Thanks for the nudge in the right direction!
I figured out the problem. By making a “index” function, I was able to solve the problem!

def index():
  return render_template("index.html")

Glad you were able to figure it out! That’s a rewarding feeling. Keep going! :mechanical_arm:

1 Like

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