Python 运行程序发生异常:TypeError: 'NoneType' object is not callable

Python 运行程序发生异常:TypeError: 'NoneType' object is not callable

 

解决办法:这是在调用函数时没有 return造成的,只要在函数中加入return即可解决

       

如果你的函数有返回,但为何还会发生异常,是格式对应的不正确导致的!

Python 运行程序发生异常:TypeError: 'NoneType' object is not callable

那么你看就会发生异常了,那你就必须调整一下位置就OK!

Python 运行程序发生异常:TypeError: 'NoneType' object is not callable