Web.py “Hello world” not working - ERR_ADDRESS_INVALID

跟風遠走 提交于 2019-12-26 15:30:04

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!