错误
TypeError: unsupported operand type(s) for |: 'type' and 'type'
解决方法
python版本原因
有一些特性只有python 3.10
及以上才有,主要是在函数注释部分,更新python到最新版本即可。
如果不方便更新,可以修改代码
示例:
原代码:
def __getitem__(self, item: int | slice | torch.BoolTensor) -> "TrackInstances":
修改为:
def __getitem__(self, item) -> "TrackInstances":
或者
def __getitem__(self, item):