![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python Errors
海色天蓝
这个作者很懒,什么都没留下…
展开
-
Spyder crashed during last session 及其后诸多问题
Q1. Spyder crashed during last session 有一次电脑没电自动关机后Spyder就打不开了,尝试了spyder --reset等方法后仍然失败,最后只好重装Spyder AnacondaNavigator—>Spyder—>Remove Application,之后再点击Install即可。 Q2.AttributeError: module ‘numpy‘ has no attribute ‘ndarray‘ 在Spyder...原创 2022-03-18 21:19:39 · 1738 阅读 · 0 评论 -
Python报错 TypeError: super(type, obj): obj must be an instance or subtype of type
今天在Spyder里用BeautifulSoup的时候跑代码报这个TypeError。 遇到这个问题之后在网上搜了一下也不知道怎么解决,结果在Spyder里重启Ipython内核之后,就没有报错能顺利跑代码了。也不知道啥原理,重启解决一切问题吧... ...原创 2021-09-21 03:01:34 · 1238 阅读 · 0 评论 -
Python中 “TypeError: list indices must be integers or slices, not str”报错的解决方案
List1 = ["As12", "dF58", "BG99", "ry87", " bbt5", " jytu "] List2 = [List1[i].upper().strip() for i in List1] 在处理一个list的时候想将list中的string处理成首尾无空格、且全部大写的统一形式,方便后续进行排序,按上述方式运行时产生"TypeError: list indices must be integers or slices, not str" 经查询后发现下述方法可以解决,.原创 2021-08-02 00:51:31 · 1588 阅读 · 0 评论