腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
如何覆盖PasswordResetConfirmView?(django.contrib.auth.views)
django
、
django-views
、
django-authentication
CustomPasswordResetConfirmView(PasswordResetConfirmView):但它提高了TypeError:__
init
__()
takes
1
positional
argument
but
2
were
given
浏览 1
提问于2019-07-28
得票数 1
回答已采纳
1
回答
在调用OOP函数时,TypeError:接受一个位置参数,但给出了两个位置参数。我该怎么解决这个问题?
python
、
oop
但是,当我运行下面的代码时,我会得到一个TypeError: print_guess()
takes
1
positional
argument
but
2
were
given
。from colorama import init, Fore, Back, Style def __
init__
(self, guess, answer):in range(5): colour = getattr(Back
浏览 4
提问于2022-05-25
得票数 -1
回答已采纳
1
回答
TypeError: Person()采用一个位置参数,但给出了两个
python
运行python3.8.10获取错误TypeError: Person()
takes
1
positional
argument
but
2
were
given
def __
init__
(self, a, b): self.bb = b 如果我将Person__
init__
降到一个参数,
浏览 3
提问于2022-08-12
得票数 0
回答已采纳
1
回答
sklearn管道error - fit()采用
1
个位置参数,但给出了3个
python
、
scikit-learn
、
pipeline
正在尝试运行以下命令: def __
init__
(self): return self,
2
, 3], "c
1
": ["a", "b", "c"], "c
2
": ["x&
浏览 16
提问于2021-06-04
得票数 0
回答已采纳
1
回答
Python继承- TypeError:__
init__
()接受一个位置参数,但给出了4个
python
、
inheritance
、
python-requests
import requests def __
init__
(self, *args, **kwargs):# do stuff >>TypeError: __
init__
()
takes
1
positional
argument
but 4
were
浏览 2
提问于2018-10-06
得票数 0
1
回答
TypeError at /password_reset/ django
django
、
python-3.x
我试图覆盖默认的密码重置模板,并得到了以下错误:__
init__
()
takes
1
positional
argument
but
2
were
given
url(r'^password_reset/$', auth_views.PasswordResetView, {'template_name':
浏览 3
提问于2018-09-22
得票数 0
回答已采纳
2
回答
初始化小部件的正确方法是什么?
python
、
kivy
我有一个自定义小部件,用于显示Kivy应用程序中的错误: super__
init__
(self, **kwargs) Color(255/255.0, 99/255.0, 71/255.0)Rectangle(pos=((Window.size[0] /
2
)-150,(Window.si
浏览 5
提问于2020-10-10
得票数 0
2
回答
Manim Community v0.5.0的Graph类有问题吗?
graph
、
manim
Pycharm中使用Manim社区的最新版本 这段代码 class MovingVertices(Scene): vertices = [
1
,
2
, 3, 4] g = Graph(vertices, edges)出现此错误: TypeError: __
init__
浏览 52
提问于2021-04-20
得票数 0
1
回答
向导django 2.1:__
init__
()接受
1
个位置参数,但给出了
2
个
python
、
django
、
django-formwizard
我有这个错误:Django Version: 2.1.4Exception Value:
浏览 12
提问于2019-01-31
得票数 0
1
回答
使用简单GET方法的Django视图在TypeError中的结果
python
、
django
使用django.views.View的一个非常简单的子类,我得到了一个错误消息为__
init__
()
takes
1
positional
argument
but
2
were
given
的TypeErrorTypeError: __
init__
()
takes
1
positional
argument
but
2
were</em
浏览 33
提问于2020-06-21
得票数 0
回答已采纳
1
回答
你能帮我用python编写这个简单的kwarg例子吗?
python
、
python-3.x
这是python3代码: def __
init__
(self, **kwargs):b = B(a) b = B(a) TypeError: __
init__
()
takes
1
positional
<e
浏览 0
提问于2015-12-26
得票数 0
1
回答
TypeError:__
init__
()采用一个位置参数,但给出了5个
python
、
databases
Traceback (most recent call last)
1
############### CONFIGURE THIS ###################----> 3 db = pymysql.connect("localhost","sql8510682","6huzgCC7q3","sql85106
浏览 0
提问于2022-08-04
得票数 0
1
回答
使用小部件在jupyter笔记本中显示gif
python
、
jupyter-notebook
、
ipywidgets
gif_box = widgets.Image("sample.gif")gif_box = widgets.Video("sample.gif")TypeError: __
init
__()
takes
1
positional
argument
but
2
were
given
不管我怎么尝试,它都不会起作用
浏览 35
提问于2020-03-12
得票数 2
回答已采纳
1
回答
如何构建这个“类装饰器”?
python-3.x
、
decorator
这是我尝试过的代码: def __
init__
(self, func, msg): return msg print(res)TypeError: __
init
__() missing
1
required
positional
argument
:
浏览 28
提问于2019-07-31
得票数 1
回答已采纳
1
回答
不能对递归嵌套的默认值进行筛选
python
、
inheritance
、
pickle
、
defaultdict
我有一个递归嵌套的defaultdict类定义为 def __
init
__
init__
(self.__class__)当我尝试腌制它的时候。from nested_dict import NestedDict pickle.loads(pickle.dumps(d)) 我得到了TypeError: __
init
__(
浏览 1
提问于2018-08-23
得票数 2
回答已采纳
1
回答
多线程中的异常- Python
python
、
multithreading
_kwargs)Exception in thread_kwargs) TypeError: get_book_info()
takes
1
positional
argument
but
2
were
give
浏览 3
提问于2021-05-13
得票数 1
回答已采纳
1
回答
尝试将python与mysql链接时出现错误
python
、
mysql
、
typeerror
、
pymysql
TypeError: __
init__
()
takes
1
positional
argument
but 5
were
given
这就是错误,我将分享下面的脚本: import pymysql print
浏览 4
提问于2021-10-10
得票数 1
4
回答
使用非关键字参数(a.k.a *args)初始化FastAPI BaseModel
python-3.x
、
fastapi
、
pydantic
name: str = ""Item(*data)TypeError: __
init
__()
takes
1
positional
argument
but 3
were
given
有方法从元组初始化BaseModel吗?
浏览 8
提问于2022-05-17
得票数 0
2
回答
在__
init__
中解压**
python
我已经将问题简化为尽可能简单的代码: def __
init__
(self, **kwargs):这是python 3.4.3和2.7.6中的代码,在其他运行良好的脚本中,这些代码看起来与此相同。它一直给我一个TyperError抱怨我使用了错误的参数: TypeError: __
init__
()
takes
1
positiona
浏览 0
提问于2015-04-23
得票数 1
回答已采纳
1
回答
如何对继承的异常进行筛选?
python
、
pickle
这段代码class Error(Exception): super().__
init__
("Some error message") a = pickle.dumps(c)引发错误:TypeError: __
init__
()
takes
1
position
浏览 0
提问于2018-04-08
得票数 6
回答已采纳
点击加载更多
相关
资讯
Python函数的5类参数使用详解
函数参数有多少(上)
python 实现多继承
Python语言特性:类的布局
Python教程(25)——Python中参数类型详解
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券