Forums

404, the requested url not found.

Hi, I have looked into another posts listed under the same topic and i couldn't resolve my issue. I have clearly described at the link https://stackoverflow.com/questions/59587907/the-requested-url-not-found-404-error-in-pythonanywhere.

When i run the same flask application in local run, i am able to view pages. However, when i try to call the application using url s1782662edin.pythonanywhere.com, I get url not found. I couldn't even diagnose the issue too.

If you're getting a 404, it's because you have not defined a route for the url you're trying to access. If it's working locally, then either you're not running the code you think you're running, or the code that is supposed to define the route is not being run for some reason.

flask app not also running.

it is giving me url not found even when i followed a YouTube tutorials step by step.

it only show it default flask_app.py, but doesn't work if i upload my own and change the WGS configuration to the name of the new file i upload.

why???

so you mean that there is some flask app that does work, but another flask app that you wrote that doesn't? perhaps you could look at what the differences are between them?

which youtube tutorial did you follow?

In most cases they (youtube tutorials ) use local machine to run django, however if you want it to run on pythonanywhere, you have to change some configurations. I suggest you to post the error with codes, it will be easier for conrad to track and solve.