Thank you for your replies!
I tried applying the fix from the pull request [#670](https://github.com/ansible-collections/ansible.netcommon/pull/670), but unfortunately, it does not resolve the issue for me.
I updated `netconf_config.py` with the proposed modifications:
```diff
- from ansible.module_utils._text import to_text
+ from ansible.module_utils._text import to_native, to_text
- confirm = module.params["confirm"]
+ confirm = to_text(module.params["confirm"], error="surrogate_or_strict")
However, I noticed that there is a typo in the to_text()
call. The parameter should be errors
, not error
.
Even after fixing this, I get the following error:
'>' not supported between instances of 'str' and 'int'
I also tried modifying the argument_spec
to change the confirm
parameter type:
"text"
confirm=dict(type="text", default="0")
Error:
argument 'confirm' is of type <class 'int'> and we were unable to convert to text: 'NoneType' object is not callable
"str"
confirm=dict(type="str", default="0")
Error:
'>' not supported between instances of 'str' and 'int'
At this point, I haven't found a working solution.
I have some Python knowledge, but I’m not an expert in Ansible module development, so I’m not sure where to go from here.
If anyone has insights on how to properly handle this, I would greatly appreciate the help! 🚀