问题
I'm trying to get the "Hello World" example for Web.py working and it's giving me an error:
This person seemed to be having the same issue in 2011 and the sole response suggested it might be a firewall issue. I have tried setting a new port as described here and it made no difference. I know that the new port I tried (5000) is not blocked by any firewall on my computer, so this isn't a firewall issue.
回答1:
0.0.0.0
is the IP address is bound to. Your server will be reachable on every interface of your machine on any of the IP addresses that your computer has been assigned.
To contact the server, you need to specify its actual IP address. 0.0.0.0 is not a valid IP address. For instance, if the server runs on your local machine, try http://127.0.0.1:8080/ .
回答2:
You can't visit 0.0.0.0, that just means your server is listening on all addresses. You need to visit localhost, ie 127.0.0.1.
来源:https://stackoverflow.com/questions/48926218/web-py-hello-world-not-working-err-address-invalid