CoordAtt.__init__() got an unexpected keyword argument 'in_put'
时间: 2023-10-06 16:05:01 浏览: 30
这个错误提示的意思是 CoordAtt 构造函数 __init__() 接收到了一个非预期的关键字参数 'in_put'。这可能是因为代码中传递的参数名有误造成的。请检查传递给 __init__() 函数的所有关键字参数的拼写和使用是否正确。另外,也可以检查一下 CoordAtt 类的定义是否正确,是否确实需要接收 'in_put' 这个参数。如果不需要,可以将调用函数中的这个参数移除。
相关问题
WebDriver.__init__() got an unexpected keyword argument
根据提供的引用[1],错误原因是WebDriver的__init__()方法中出现了意外的关键字参数options。这通常是因为使用了不兼容的WebDriver版本或不正确的参数。建议检查WebDriver的版本和参数是否正确。
另外,根据提供的引用,AttributeError:'WebDriver'objecthasnoattribute'find_element_by_xpath',这通常是因为WebDriver对象没有find_element_by_xpath属性。建议检查代码中是否正确实例化了WebDriver对象,并且是否正确导入了相关的模块。
以下是一个可能的解决方案:
```python
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
# 创建ChromeOptions对象
chrome_options = Options()
chrome_options.add_argument('--headless') # 无头模式
# 创建WebDriver对象
driver = webdriver.Chrome(options=chrome_options)
# 访问网页
driver.get('https://www.example.com')
# 查找元素
element = driver.find_element_by_xpath('//div[@class="example"]')
# 关闭浏览器
driver.quit()
```
SimpleImputer.__init__() got an unexpected keyword argument 'axis
SimpleImputer是scikit-learn库中的一个类,用于处理缺失值。它的__init__()方法用于初始化SimpleImputer类的对象,并且不接受'axis'这个关键字参数。如果你在调用SimpleImputer的__init__()方法时出现了"SimpleImputer.__init__() got an unexpected keyword argument 'axis'"的错误提示,可能是因为你错误地传递了'axis'参数。
可能的原因是你使用了过时的参数或者版本不匹配。请确保你使用的是最新版本的scikit-learn库,并且按照正确的方式调用SimpleImputer类的__init__()方法。如果你需要指定轴向处理缺失值,可以使用其他方法或者参数来实现。