TypeError: __init__() takes 6 positional arguments but 23 were given
时间: 2023-10-31 18:33:11 浏览: 95
django报错:add_atr() takes 0 positional arguments but 1 was given
This error message means that you are calling the `__init__` method of a class with too many arguments. The `__init__` method is the constructor method of a class, and it is called when you create a new instance of the class.
In this case, you are passing 23 arguments to the `__init__` method, but it only expects 6. This could be caused by a number of things, such as passing in too many arguments when creating a new instance of the class, or passing in the wrong types of arguments.
To fix this error, you should review the code that is creating the instance of the class and make sure that you are passing in the correct number and types of arguments. You may also need to review the definition of the class to make sure that the `__init__` method is expecting the correct number of arguments.
阅读全文