如何解决<AttributeError: 'NoneType' object has no attribute 'name'> 在运行 .exe 格式的 python 文件时怎么修?
def putPassword():
count = 0
while count < 3:
passWord = "admin"
playsound.playsound(file5)
givenPass = takeCommand()
if givenPass == passWord:
playsound.playsound(file2)
break
else:
playsound.playsound(file1)
count = count + 1
while count == 3:
speak("Wrong Password")
playsound.playsound(file4)
exit()
“编译 putPassword() 时出现 AttributeError”。我使用 python 创建了该文件,然后使用 powershell 将其制作为 .exe。然后运行它,错误来了:
AttributeError: 'NoneType' 对象没有属性 'name'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。