run(host='localhost', port=8080, reloader=True, debug=True)
set at the end of the file. After trying the same tutorial @ home with no problems (using Linux), I figured the problem had to be somewhere in the form of Python that I'm using. I was using Spyder, but reverted to running the script directly from the command line, and noticed that it appears to not be exiting cleanly when it reloads and/or when the script is stopped, as I'm getting an error like this:
E:\python\data\bottle-todo>E:\python\WinPython-32bit-184.108.40.206\python-3.4.3\lib\site-packages\bottle.py:3113: ResourceWarning: unclosed <socket.socket fd=268, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8080)> server.run(app)
I can get things working if I look up and kill any running python processes, and then remove the
reloader=True argument to
run()... but that seems like fixing the symptom, not the problem. FWIW, I still get the same error message when I terminate the running script with
CTRL+C, but it seems to actually terminate - unlike with the reloader.
Question is... is this a bottle.py problem with the reloader under python3.4 + windows, or WinPython, or something else?