![](https://img-blog.csdnimg.cn/20190918140012416.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Error
实践中错误的汇总和解决方案
季泠
你是我虚耗时间的毒药
也是我盲目生活的目标
展开
-
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+
采用降低urllib3的版本的方式,实测可行。安装使用moviepy,测试出现问题。原创 2024-02-03 09:28:26 · 168 阅读 · 0 评论 -
Extension activation failed, run the ‘Developer: Toggle Developer Tools‘ command for more informatio
今天打开vs code运行代码被提示这个错误,就记录一下我这边的解决方案,仅供参考。在【扩展】中移除当前的python,重新安装【预发布版本】即可。原创 2023-01-16 22:04:46 · 2357 阅读 · 0 评论 -
安装PyAudio出错
操作系统:Win 10python版本:3.8pip错误:error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”解决方法:既然是缺少编译环境,那么就用whl文件好了。whl格式本质上是一个压缩包,里面包含了py文件,以及经过编译的pyd文件。使得可以在不具备编译环境的情况下,选择合适自己的python环境进行安装。仙人指路????pythonlibs-whl原创 2020-09-23 18:52:31 · 280 阅读 · 0 评论 -
“gbk“ codec can‘t decode
完整错误:‘gbk’ codec can’t decode byte 0xac in position 4: illegal multibyte sequence。gbk这个字符集没办法翻译文本内容,在open()里面把decoding参数设置为“UTF-8”,一般就能解决。原创 2020-09-16 20:33:37 · 3223 阅读 · 1 评论 -
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘XXX‘, port=443)
运行代码import requestsresponse = requests.get("https://www.baidu.com")print(response.status_code)会报错。解决办法:1、先检查是否已安装requests的依赖安装包:pip install cryptographypip install pyOpenSSLpip install certifi2.如果安装后依然报错:则在请求后面加上verify=False就可以response = r转载 2020-09-11 21:51:24 · 1658 阅读 · 0 评论 -
ImportError: cannot import name ‘BeautifulSoup‘
完整错误:ImportError: cannot import name ‘BeautifulSoup’ from partially initialized module ‘bs4’ (most likely due to a circular import)只要是正常的下载安装模块,就不会出现问题,这种错误最大的可能是某个模块的名字也是bs4,覆盖了真正的bs4....原创 2020-09-11 21:49:01 · 973 阅读 · 1 评论 -
PermissionError: [Errno 13] Permission denied
PermissionError:[Errno 13]权限被拒绝错误原因汇总:文件打开未关闭。原创 2020-08-30 19:02:41 · 389 阅读 · 0 评论 -
关于python的turtle库使用RGB色彩表示法出错
raise TurtleGraphicsError(“bad color sequence: %s” % str(color))turtle.TurtleGraphicsError: bad color sequence: (0, 255, 0)错误原因很简单,除了RGB表示法中取值在[0, 255]间外,turtle存在一种默认的表示法取值在[0 - 1]之间,包括小数。解决方法,在代码中添加一行:Screen().colormode(255)将默认的[0 - 1]切换成[0 - 255].原创 2020-08-24 13:55:26 · 14522 阅读 · 7 评论 -
关于selenium的异常处理
安装selenium时的错误:ERROR: Could not find a version that satisfies the requirement selenium (from versions: none)ERROR: No matching distribution found for selenium解决方法:打开cmd,pip --default-timeout=100 i...原创 2019-12-19 21:36:16 · 555 阅读 · 0 评论 -
异常处理汇总-1
TypeError: object of type ‘Response’ has no len()hmtl=requests.get(‘http://shakespeare.mit.edu/hamlet/hamlet.1.1.html’)hmtl.raise_for_status()hmtl.encoding=‘iso-8859-1’soup = BeautifulSoup(hmtl,...原创 2019-10-28 02:02:15 · 2125 阅读 · 0 评论