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。

解决问题。

原文地址:https://www.cnblogs.com/aosting/p/3683546.html