Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"'ascii' codec can't decode byte 0xc3 in position 32: ordinal not in range(128)" #25

Open
jdinocco opened this issue Apr 15, 2019 · 0 comments

Comments

@jdinocco
Copy link

Hi, I'm working whit the snmp_trap handle and Im getting the following error:

`The full traceback is:
File "/tmp/ansible_dOZXfU/ansible_modlib.zip/ansible/module_utils/cisco_imc.py", line 39, in login
server.login()
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imchandle.py", line 143, in login
return self._login(auto_refresh=auto_refresh, force=force, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imcsession.py", line 581, in _login
response = self.post_elem(elem, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imcsession.py", line 283, in post_elem
response_str = self.post_xml(xml_str, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imcsession.py", line 234, in post_xml
response_str = self.post(uri=imc_uri, data=xml_str, read=read, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imcsession.py", line 210, in post
response = self.__driver.post(uri=uri, data=data, read=read, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/imcsdk-0.9.5-py2.7.egg/imcsdk/imcdriver.py", line 262, in post
if "Connection reset by peer".lower() in str(e).lower():

fatal: [compute45]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"hostname": "10.92.97.206",
"ip": "10.4.20.54",
"notification_type": "traps",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": "162",
"proxy": null,
"secure": null,
"server": null,
"state": "present",
"user": null,
"username": "admin",
"version": "2"
}
},
"msg": "'ascii' codec can't decode byte 0xc3 in position 32: ordinal not in range(128)"
}
`

This is my playboook
`---

  • hosts: test
    connection: local
    gather_facts: no
    tasks:
    • name: enable SNMP Traps
      cisco_imc_snmp_trap:
      hostname: "10.92.97.206"
      port: "162"
      version: "2"
      notification_type: "traps"
      state: "present"
      ip: "{{ imc_ip }}"
      username: "{{ imc_username }}"
      password: "{{ imc_password }}"`

Do you have any advice?

PS: the syslog, syslog_remote and snmp scripts working fine.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant