python错误:TypeError: ‘module‘ object is not callable解决方法

python错误:TypeError: ‘module‘ object is not callable解决方法
执行程序
python错误:TypeError: ‘module‘ object is not callable解决方法_第1张图片
运行结果
执行程序时遇到的问题
出现了TypeError: ‘module‘ object is not callable错误,即模块调用出错。经查找资料知,程序中调用的fft()函数是在scipy库的fftpack模块下,因此错误原因是fft()函数所在模块引用错误,可以用如下方法解决:
1.导入fftpack模块,直接引用
python错误:TypeError: ‘module‘ object is not callable解决方法_第2张图片

2.在scipy库中引用fftpack模块,再使用fft()函数
python错误:TypeError: ‘module‘ object is not callable解决方法_第3张图片
这样问题就解决了,最终结果为:
python错误:TypeError: ‘module‘ object is not callable解决方法_第4张图片

你可能感兴趣的:(异常处理,python)