2011-03-07 121 views

回答

2

这不是一个错误,它只是一个警告信息。

此消息由this line引入,其建议是仅自动打开网络浏览器。

但是,即使没有web浏览器模块,你应该能够运行的web2py并忽略警告信息,

如果无法运行web2py的或有任何问题,请打开issue ticket和web2py的开发者来看一下,它。

1

的消息从这里来的:

def try_start_browser(url): 
""" Try to start the default browser """ 

try: 
    import webbrowser 
    webbrowser.open(url) 
except: 
    print 'warning: unable to detect your browser' 

你可以尝试从一个python CLI壳webbrowser.open看到特定的异常是什么。在我的(OS X)系统上:

 
~ $ python 
Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import webbrowser 
>>> webbrowser.open('http://stackoverflow.com') 
True