报错:TypeError: 'NoneType' object is not callable问题解决
程序员文章站
2024-02-12 17:23:58
...
报错:TypeError: 'NoneType' object is not callable问题解决方法
def dec(function):
print("start...")
function()
print("end...")
#修饰器
@dec
def say():
print("say...")
#执行报错:TypeError: 'NoneType' object is not callable
say()
# 解决方法:调用函数时去掉括号
say
上一篇: 装饰器 TypeError: 'NoneType' object is not callable
下一篇: Debug3:使用DataFrame时报错TypeError: 'NoneType' object is not callable
推荐阅读
-
装饰器 TypeError: 'NoneType' object is not callable
-
解决:TypeError: 'list' object is not callable
-
报错:TypeError: 'NoneType' object is not callable问题解决
-
Debug3:使用DataFrame时报错TypeError: 'NoneType' object is not callable
-
TypeError: 'NoneType' object is not callable--python报错
-
U-Net运行报错merge6 = merge([drop4,up6], mode = 'concat'...) TypeError: 'module' object is not callable
-
爬虫出现TypeError: cannot use a string pattern on a bytes-like object报错
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#
-
TypeError: POST data should be bytes, an iterable of bytes, or a file object.制作有道翻译小翻译软件的问题解决方法