__init__() missing 1 required positional argument: 'c2'
时间: 2023-09-24 16:04:32 浏览: 243
回答: 错误原因是在调用CBAM类的__init__()方法时缺少了一个必需的位置参数'c2'。\[2\]要解决这个问题,需要在调用CBAM类时传入正确的参数。另外,还需要在yaml文件中设置CBAM模块时传入正确的参数,以确保程序能够正常执行。\[2\]
在第三个引用中,报错的类型是TypeError,具体错误信息是__init__()缺少一个必需的位置参数'comment'。\[3\]要解决这个问题,需要在调用Book类的__init__()方法时传入正确的参数。在创建FictionBook类的实例时,需要传入name、author、comment和state这四个参数。\[3\]
#### 引用[.reference_title]
- *1* [python错误:TypeError: __init__() missing 1 required positional argument: ‘n](https://blog.csdn.net/m0_51788349/article/details/118655043)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [已解决TypeError: __init__() missing 1 required positional argument: ‘c2](https://blog.csdn.net/qq_46008620/article/details/130625066)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Python成功解决TypeError: __init__() missing 1 required positional argument: ‘comment](https://blog.csdn.net/weixin_44991673/article/details/110099428)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文