首页 > 编程语言 > Python > Python 3.7 报错:module ‘urllib’ has no attribute ‘urlencode’
2019
03-04

Python 3.7 报错:module ‘urllib’ has no attribute ‘urlencode’

从 Python 2.7更新到3.7版本后,原来执行正常的脚本报错:AttributeError: module ‘urllib’ has no attribute ‘urlencode’的错误。

原来Python3.7的urllib结构不太一样,要写成:urllib.parse.urlencode

最后编辑:
作者:游戏创作者大陆

留下一个回复

你的email不会被公开。