有人可以解释这个错误意味着什么

use*_*238 0 python integer typeerror nonetype

TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我这个错误意味着什么.

jon*_*rpe 5

这意味着你已经完成了例如

a = b - c
Run Code Online (Sandbox Code Playgroud)

但是,虽然b是一个int,c is None因此减法操作不可能发生.

至于根本原因,很可能在某个时刻c = some_function()并且有一条路径some_function(隐式或明确地)return None.