[英]TypeError: '>' not supported between instances of 'int' and 'NoneType' in Python
[英]How to solve this TypeError: '>' not supported between instances of 'NoneType' and 'int' in python
我使用在線提到的所有技術來解決以下錯誤“TypeError:'>'在'NoneType'和'int'的實例之間不受支持”但失敗了。
這是我的代碼
---
def checkfun()
---
if (CheckBottomYCoVaring(length) == True):
---
def CheckBottomYCoVaring(length):
result = False
if (TempBotY > PrevbottomY[length]):
if (TempBotY - PrevbottomY[length]) < 3:
result = True
else:
result = False
else:
if (PrevbottomY[length] - TempBotY) < 3:
result = True
else:
result = False
return result
TempBotY 的值為 None
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.