python3解决UnicodeEncodeError: ‘ascii’ codec can’t encode charactersordinal not in range

python3解决UnicodeEncodeError: ‘ascii’ codec can’t encode charactersordinal not in range,第1张

我是个小白 搜了很多解决方案都是sys,只适合python2的,python3用不了

这个解决方案可能不适合所有人,但我的解决了
在python安装目录下打开lib\http\client.py

大概第1211行request.encode('ascii')改为request.encode('utf-8')

            

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/916000.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存