array() takes from 1 to 2 positional arguments but 4 were givenarray() takes from 1 to 2 positional arguments but 4 were given
时间: 2023-10-31 09:41:03 浏览: 298
This error message is indicating that the function `array()` was called with four arguments, but it can only accept one or two positional arguments. A positional argument is an argument that is not a keyword argument, meaning it is not passed with a named parameter.
For example, if you were to call `array(1, 2, 3, 4)` this would result in the error message because `array()` only accepts one or two positional arguments.
To fix this error, you should check the number of arguments you are passing to the `array()` function and make sure it is within the allowed range of one or two positional arguments. If you need to pass more arguments, you may need to use a different function or modify the existing function to accept more arguments.
阅读全文