TypeError: 'bytes' object is not callable 解决方法

xiaoxiao2021-07-27  92

源代码如下,定义的本地变量get_time和get_time()外部引入方法重名,调用get_time(),被当成了本地变量get_time= b'\d+

.\d+',变量不可被调用(函数才可调用)。

if __name__ == '__main__': get_time= b'\d+\.\d+' path=input("输入要分割文件的路径:") count,time = get_time(path,get_time) print("直流开关机次数:",count,"\t 开机时长:", time)

 

 

转载请注明原文地址: https://www.6miu.com/read-4823370.html

最新回复(0)