标题: 'module' object has no attribute 'urlopen' [打印本页] 作者: asdf2110 时间: 2013-06-08 09:22 标题: 'module' object has no attribute 'urlopen' 请教大家个问题,昨天网上找了个抓取网页天气的程序,为什么在 win32 cmd 终端执行老是报错呢,在linux就没事
win32:Python 3.3.2
linux:Python 2.4.3
win32 报错如下:
Traceback (most recent call last):
File "gw.py", line 14, in <module>
weatherList=getWeather(getHtml('http://gd.weather.com.cn/index.shtml'))
File "gw.py", line 5, in getHtml
page=urllib.urlopen(url)
AttributeError: 'module' object has no attribute 'urlopen'