python 报错整理

使用urllib.urlopen(url)的时候报错

whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))

AttributeError: 'module' object has no attribute 'maketrans'

google到这个页面http://hi.baidu.com/chb_seaok/item/438f7b3faf28bf88b711db0b。

解决问题。

posted @ 2014-04-23 18:18  aosting  阅读(215)  评论(0编辑  收藏  举报