“AttributeError: NoneType 对象没有属性 tk"的含义? [英] Meaning of "AttributeError: NoneType object has no attribute tk"?

查看:34
本文介绍了“AttributeError: NoneType 对象没有属性 tk"的含义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下错误消息是什么意思?

What does the following error message mean?

AttributeError: 'NoneType' object has no attribute 'tk'

推荐答案

这意味着在你的代码中你正在调用的地方

It means that in your code some where you are calling

x.tk

xNone (NoneType).

x 应该是假定具有属性 tk 的对象.

x should have been an object that is assumed to have an attribute tk.

要解决此问题,您可以查看从何处获取 x 并查看为什么它没有返回适当的对象.

To solve this problem, you can check out where you are obtaining x and see why it is not returning an appropriate object.

这篇关于“AttributeError: NoneType 对象没有属性 tk"的含义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆