web.py inet_pton windows部署错误
2014-01-07 10:00
621 查看
web.py 入门demo遇到的问题
1. 问题:windows下出现 AttributeError: 'module' object has no attribute 'inet_pton' 错误
解决方法:
https://github.com/webpy/webpy/pull/195 中提到 “inet_pton
has not been implemented in python on windows.”,并建议修改\Lib\site-packages\web\net.py文件
[python] view
plaincopy
def validip6addr(address):
"""
Returns True if `address` is a valid IPv6 address.
>>> validip6addr('::')
True
>>> validip6addr('aaaa:bbbb:cccc:dddd::1')
True
>>> validip6addr('1:2:3:4:5:6:7:8:9:10')
False
>>> validip6addr('12:10')
False
"""
""" 注释掉这几行代码并返回False
try:
socket.inet_pton(socket.AF_INET6, address)
except socket.error:
return False
return True
"""
return False
这个方法在后来下载安装的稳定版中并没有,所以建议直接让此方法返回False即可。
2. 问题:
运行服务后访问 http://0.0.0.0:8080/ 提示无法访问网页
解决方法:
使用指定ip:host,例如运行code.py 127.0.0.1:1234 即可正常访问。
转自:
http://blog.csdn.net/skyin333/article/details/8928247
相关文章推荐
- web.py 启动时候出现AttributeError: 'module' object has no attribute 'inet_pton'错误
- web.py 启动时候出现AttributeError: 'module' object has no attribute 'inet_pton'错误
- WIndows部署web.py,django利器--PyWebServer 0.1 dist
- Windows环境下使用Apache+mod_wsgi部署webpy
- Windows环境下使用Apache+mod_wsgi部署webpy
- windows平台上nginx部署web.py(转)
- Eclipse 部署Web项目时出现 Tomcat version 6.0 only Supports J2EE 1.2,1.3,1.4 and Java EE 5 Web Modules错误
- 在windows下如何快速搭建web.py开发框架
- windows+web.py+fastcgi+nginx
- 通过Fastcgi和lighttpd部署web.py
- 关于MarkDownPad2报--Awesomium.Windows.Controls.WebControl'....错误
- IDEA部署web项目到tomcat,经常报PermGen space错误解决方法
- 【Python】windows下Eclipse中安装集成webpy框架
- Windows 网络服务架构系列课程详解(三) ---------Web站点的部署方案 推荐
- MVC 部署出错 ,HTTP 错误 403.14 - Forbidden Web 服务器被配置为不列出此目录的内容。
- 错误 1 类型“System.Web.UI.ScriptManager”同时存在于“c:\windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0
- Windows下nginx+web.py+fastcgi服务搭建
- 在apache上部署web.py项目(python2.7+web.py+mod_wsgi+apache2.2)
- WebPart的Web部件页部署时发生错误