Python:urllib.error.URLError用法:<urlopen error[WinError 3]系统找不到指定的路径:“”>

2024-10-03 15:23:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我对这个很陌生,所以我不确定为什么我会得到这个错误

相关代码:

htmlconv = open('savedlist.html','w', encoding = 'UTF-8')
filepath = 'file://'+str(path.abspath('savedlist.html'))
#prints as: file://C:\Users\....\savedlist.html

urlopen(filepath)

错误:

^{pr2}$

提前谢谢!在


Tags: path代码html错误openutfencodingfile