
错误记录
python 错误记录
LCY133
这个作者很懒,什么都没留下…
展开
-
问题:线程池内调用os.path.dirname(os.path.abs(__file__))后线程不再执行
出现问题,未能解决原创 2023-02-02 17:36:09 · 224 阅读 · 0 评论 -
错误记录:TypeError: object() takes no parameters
其实问题的原因在于,写__init__方法时写成了__int__,在这里很容易写错的,因为pycharm的提示中是都有这两种的,而且问题还不好查找。一个很简单的定义类和进行实例化的例子。原创 2022-07-24 15:18:19 · 269 阅读 · 0 评论 -
cmder使用中出现问题:attempt to call a nil value
cannot open D:\cmder鏂癨vendor\clink\clink.lua: No such file or directory注:这个问题的原因是cmder后有乱码,其安装路径有中文,此软件并不能识别在运行中还会出现:此时的问题是每一条命令后都带一个这个,而且带一个换行,太讨厌了,于是,我们还是要将安装路径的中文去掉的,或者安装在纯英文路径...原创 2020-12-22 23:53:55 · 5634 阅读 · 0 评论 -
python 函数中的全局变量使用(错误:UnboundLocalError: local variable ‘a‘ referenced before assignment)
遇到了错误:UnboundLocalError: local variable ‘a’ referenced before assignment代码:a = 1b = 2def test1(): print("a=",a) print("b=",b)def test2(): a += 1 b += 1def test3(): a = 3 print(a)test1()test2()test3()test1()这里test1函数只打印原创 2020-12-07 16:14:19 · 325 阅读 · 0 评论 -
pandas模块的使用中发生的错误:AttributeError: module ‘pandas‘ has no attribute ‘read_excel‘ 的解决方案
代码是用于读取excel文件并且进行拼接的,import pandas as pdpath = r"D:\tenlink\text.xlsx"file1 = pd.read_excel(path,sheet_name=0)file2 = pd.read_excel(path,sheet_name=1)file3 = pd.read_excel(path,sheet_name=2)print(pd.concat((file1,file2,file3)))在运行之后发现报错:Traceb原创 2020-11-16 13:59:23 · 15185 阅读 · 2 评论