I have tried several ways to use Python Flask on Replit and nothing works anymore. I use templates, fork Repls (and change nothing), and it never works. Usually the main page (index.html) works, but all other pages don’t. I keep checking status.replit.com and nothing is there to address this.
I expect Flask Repls, especially unaltered forks of working Repls and ones made from templates to work, but they no longer do. Actual behavior:
When using any page other than the main page, I get this:
Steps to reproduce:
I tried this with an alt account too and same problem, so it is not just my account. I forked CodingCactus’ “Cactus Pinger” among other things, made no changes, and that is what I get after clicking the button (clicking the button changes you over to a different HTML file).
How is this relevant? Anyway, Firefox/Linux Mint 21/Lenovo Laptop.
I am unlucky with Replit. I had a Python program whose description said it was four hundred fifty five bytes (number form, not word form), and the moderator bot found it to be an offensive word and blacklisted it.
I don’t see any difference in code other than you removing some variables; however, this could be an error with importing the entire library. Instead of importing the entire thing for functions I may not use, I do something like:
So I got all of them fixed except the Cactus one. It seems that in Flask HTML files you must use the full URL in links instead of the HTML file name like you normally would. The Cactus pinger still makes no sense.
I already fixed this error; when he invited me to the repl, I noticed that it was returning an error stating that the key “pings” did not exist in the database and I explained why, and I simply did what you mentioned.
Apparently there can only be one solution. So, I marked @functionally’s answer as the solution because they are the one that actually fixed the program. However, @GoodVessel92551 also had this answer. Thanks to both of you! It was because of @GoodVessel92551’s comments that I thought to check the URLs, and @functionally solved it. I now follow both of you.