我正在学习区块链,所以我制作了一个区块链程序,但我遇到了这样的错误问题:
Exception in Tkinter callback
Traceback (most recent call last):
File "/Users/anthonylee/anaconda3/lib/python3.6/tkinter/__init__.py", line 1702, in __call__
return self.func(*args)
File "/Users/anthonylee/Desktop/scrawll7/blockchain_test.py", line 18, in login_attempt
print(login_check())
File "/Users/anthonylee/Desktop/scrawll7/blockchain_test.py", line 13, in login_check
login_index=usernames.index(username.get())
AttributeError: 'NoneType' object has no attribute 'get'
我知道这是关于将None传递给某些东西的东西,但我不能通过括号将变量传递给函数,我怎么能这样做呢?
代码在以下链接中:https: //github.com/ultimate-doge/bobchain
发布于 2018-10-17 10:47:12
NoneType
当创建该变量的函数返回异常并返回值时,将显示该类型None
。使用print语句检查所有函数,并确保它们的return
值正确。
https://stackoverflow.com/questions/-100002921
复制相似问题