首页 > 解决方案 > TypeError:int() 参数必须是字符串、类似字节的对象或数字,而不是“NoneType”python

问题描述

defdraw_fxn(withdraw,acct_deposit): cur.execute("SELECT acct_deposit FROM atm WHERE acct_name = ?", (acct_deposit,))
act_deposit = cur.fetchone()

acct_deposit = int(act_deposit)

if withdraw > acct_deposit:
    list1.insert(END, ("your balance is low "))

elif acct_deposit > withdraw:
    acct_deposit =  acct_deposit - withdraw

它抛出类型错误

标签: python-3.x

解决方案


推荐阅读