attributeerror 相关问题

Python`AttributeError`异常。

属性错误:“int”对象没有属性“index”(python)

我正在Python上进行“猜单词”,但我无法弄清楚这个错误。 AttributeError:'int'对象没有属性'index'(python) 它在 letterIndex=word.index(...

回答 3 投票 0

AttributeError:“WSGIRequest”对象没有属性“user”

我正在运行我的 Django 代码,但出现此错误 AttributeError:“WSGIRequest”对象没有属性“user” 我的Django版本是1.8.2,这是我的setting.py中间件类 中间件_C...

回答 2 投票 0

AttributeError:“EnumTypeWrapper”对象没有属性“POSITIONAL_ONLY”

我运行我的.py程序遇到了AttributeError:'EnumTypeWrapper'对象没有属性'POSITIONAL_ONLY' 这个错误,使用tensorflow==2.12.0 我的python版本是3.8.10 function_type_pb2.参数...

回答 0 投票 0

为什么我会收到此错误? AttributeError:类型对象“App”没有属性“tk”

此代码在运行时返回错误:“AttributeError: type object 'App' has no attribute 'tk'”。 将 tkinter 导入为 tk 从 tkinter 导入 ttk def 条目字段(父级): 框架 = ttk.Frame(

回答 0 投票 0

类方法在列表上工作一次,然后在第二轮抛出属性错误

我在一个类中创建了一个方法。当我第一次调用该方法时,它似乎有效并提供了所需的输出。当我再次运行它时,我得到一个“AttributeError: 'list' object has no att...

回答 1 投票 0

AttributeError: 'super' object has no attribute '__getattr__' KivyMD

我正在学习 KivyMD,我正在尝试添加下拉菜单,但出现此错误。这可能是因为我对 id 的错误使用,但我仍然无法弄清楚。这是我的主要 py 代码: 来自 kivymd.app

回答 1 投票 0

Python 属性错误:“NoneType”对象没有属性“find_all”

我正在尝试获取美国各州的缩写,但此代码: 从 bs4 导入 BeautifulSoup 从 urllib.request 导入 urlopen url='https://simple.wikipedia.org/wiki/List_of_U.S._states' web=urlopen...

回答 3 投票 0

AttributeError: 'AliensInvasion' 对象没有属性 'screen'。 Python 速成班游戏

我遇到了一个我无法真正理解的问题。 我有一个类如下: 外星人入侵类: def __init__(自我): # 初始化游戏并创建游戏窗口 pygame.init(...

回答 0 投票 0

AttributeError:“SMOTE”对象没有属性“fit_sample”

为什么我收到错误 AttributeError: 'SMOTE' 对象没有属性 'fit_sample' 我不认为这段代码会导致任何错误? 从 imblearn.over_sampling 导入 SMOTE smt = SMOTE(随机_...

回答 2 投票 0

Error: AttributeError: module 'pandas' has no attribute 'Int64Index'

我有最新版的pandas 名称:熊猫 版本:2.0.1 我刚刚安装了 fbprophet,现在出现错误:AttributeError: module 'pandas' has no attribute 'Int64Index' 我试过卸载...

回答 1 投票 0

我在尝试从 firebase 存储中获取文件时遇到错误

我正在制作人脸识别考勤系统,如果它检测到人脸,它将显示他们的名字图片....所以我将图像存储在 firebase 存储中,以便从我使用的存储中获取图像...

回答 0 投票 0

获取 AttributeError:'dict' 对象在 SimSwap Colab 中没有属性'to'

它给了我这个错误-----> AttributeError : 'dict' 对象没有属性 'to' 我应该怎么办?非常感谢能回答我的人

回答 0 投票 0

How to solve AttributeError: module 'numpy' has no attribute 'bool'?

我正在使用 Python 3.9.7 版的 conda 环境, pip 22.3.1,numpy 1.24.0,gluoncv 0.10.5.post0, mxnet 1.7.0.post2 从 gluoncv 导入数据,utils 给出错误: C:\Users\std naconda3 ...

回答 5 投票 0

使用类并获取 AttributeError: 'NoneType' object has no attribute 'configure'

嗨,我是编码新手,不断收到此错误 AttributeError: 'NoneType' object has no attribute 'configure' 我已经搜索了一段时间以弄清楚发生了什么,但我不能把头包起来.. .

回答 0 投票 0

DataFrame 对象没有属性append

我试图将字典附加到 DataFrame 对象,但出现以下错误: AttributeError:“DataFrame”对象没有属性“append” 据我所知 DataFrame 确实有方法 &

回答 3 投票 0

Python Django - AttributeError: 'IdeaView' 对象没有属性 'user'

我的网站允许用户发布他们的想法和其他用户对想法的评论并将想法从 1 到 10 进行评分。想法页面加载了用户的想法以及评级表和评论表,但是......

回答 2 投票 0

如何使用预写代码修复 Jupyter Lab 中的 AttributeError?

我是 Python 和编程的新手,我正在为 IBM 证书课程做作业。这些作业在 .ipynb 文件中,并且大部分代码都是预先编写的,以便我们无需 e...

回答 2 投票 0

自定义 tkinter 遇到此错误:AttributeError: type object 'ToplevelWindow' has no attribute 'bankbalance'

嗨,我是编码新手,不断收到此错误 RecursionError: maximum recursion depth exceeded 并且它说第 12 行是 self.geometry("250x300") 但我不确定为什么我得到...

回答 0 投票 0

AttributeError: partially initialized module 'cv2' has no attribute

如何解决此错误 追溯(最近一次通话): 文件“C:\Users\shash\Desktop\Python_TTH\main (3).py”,第 1 行,在 导入cv2 文件“C:\Users\shash\A...

回答 0 投票 0

为什么会出现属性错误:int object has no attribute 'isnumeric'?

我目前正在创建一个程序,它会要求用户输入年份,然后通过查看年份是否可以被 4 整除来说明它是否是闰年。它还有一个类型检查,存在

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.