python-3.x - 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
它抛出类型错误
解决方案
推荐阅读
- java - 提供者不是 docker 容器内的子类型
- git - Jenkins 使用 git 子模块构建
- google-analytics - 未设置 Google 分析客户端 ID cookie
- c# - C# 类库 DLL 未正确更新
- sql-server - ODBC 驱动程序 SQLSRV32.dll 与 SQL Server 版本的兼容性
- apache - 重定向到 https 条件
- java - orElseThrow 是否比 if(obj == null) 更好?
- reactjs - React - 在迭代项中仅单击一项时显示菜单
- javascript - 如何在X轴上设置比例?
- php - 我想使用 Laravel 5.4 和 php 一次上传多张图片。请指导我一步一步。