Question

Have successfully worked Bottle for four hours, returning code/text by calling various URLs.

For the past hour, everything is now re-routing to an old error route I set up. With nothing else in the file:

from bottle import route, run

@route("/hello")
def hello():
    return "Hello"

run(host='localhost', port=8080)

is returning:

Nothing here. Redirecting you to the login page!

Have: - closed IDLE & the .py file - deleted the bottle.pyc that's in the project directory - cleared all browser data, both Firefox & Chrome, multiple times - copied the .py file (to the same directory) & run IDLE from there

Any ideas why it's loading details I deleted an hour ago?

Regards

Was it helpful?

Solution

Hmm, some more things to try:

  1. Make sure you've really (really) shut down the process. Try requesting the page after you've exited your program; your client (browser) should get a "connection refused."

  2. Delete all .pyc files. (In particular, you should delete your own--bottle.pyc isn't the problem.)

  3. Test your web service with curl or wget, not with a browser. This way you can absolutely eliminate the browser cache as a culprit.

That's it for off-the-top-of-my-head. If I think of more, I'll come back and add to the list. Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top