首页 > 其他分享 >AttributeError: module 'urllib' has no attribute 'parse'

AttributeError: module 'urllib' has no attribute 'parse'

时间:2022-09-28 13:55:30浏览次数:47  
标签:no attribute module parse urllib import

python 路由解码,代码如下:

import urllib
urllib.parse.unquote(string)

报错

AttributeError: module 'urllib' has no attribute 'parse'

不解。
查得python3需要导入flask
震惊...

新代码:

import urllib
from flask import Flask
urllib.parse.unquote(string)

运行成功

标签:no,attribute,module,parse,urllib,import
From: https://www.cnblogs.com/zaxl932946/p/16737783.html

相关文章