3
#!/usr/bin/env python
import mechanize
mech = mechanize.Browser()
page = br.open(SchoolRank('KY'))
给出:蟒蛇:模块没有属性机械化
Traceback (most recent call last):
File "mechanize.py", line 2, in <module>
import mechanize
File "/home/jcress/Documents/programming/schooldig/trunk/mechanize.py", line 12, in <module>
mech = mechanize.Browser()
AttributeError: 'module' object has no attribute 'Browser'
而且我很困惑。我为2.6和2.7安装了模块,结果相同...
哈哈哈。我很聪明。 – 2010-11-21 04:04:18
感谢您的支持,但我仍然陷入僵局,直到我意识到必须删除相应的.pyc文件 – 2012-08-14 11:34:41