dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
336 stars 163 forks source link

Error: invalid member name: u'UsbManagedPort ' #110

Closed davisglenn closed 4 years ago

davisglenn commented 4 years ago

I am having an issue running the dellemc openmanage ansible modules. Specifically I tried: dellemc_get_system_inventory dellemc_get_lcstatus Can anyone tell me why this is happening? I am using Python 2.7.5 and omsdk 1.2.370

ansible-playbook 2.8.5 config file = /etc/ansible/ansible.cfg configured module search path = [u'/export/home/pl80488/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] Using /etc/ansible/ansible.cfg as config file statically imported: /home/pl80488/work/iac/Pipelines/playbooks/roles/upgradefirmware/tasks/getFirmware.yml

PLAYBOOK: upgradeFirmware.yml **** 1 plays in upgradeFirmware.yml

PLAY [Upgrade Firmware] ** META: ran handlers

TASK [upgradefirmware : Get hardware inventory] ** task path: /home/pl80488/work/iac/Pipelines/playbooks/roles/upgradefirmware/tasks/getFirmware.yml:7 fatal: [10.83.173.82]: FAILED! => {"ansible_facts": {"discovered_interpreterpython": "/usr/bin/python"}, "changed": false, "msg": "invalid member name: u'UsbManagedPort ' -- only alpha/numeric and underscore () characters are supported"}

thanks Glenn

jagadeeshnv commented 4 years ago

Hi @davisglenn , this issue was due to the update in the enum34 library. this will be seen in enum34==1.1.8 and 1.1.9. We had reported the issue to https://bitbucket.org/stoneleaf/enum34/issues/29/member-keys-with-special-characters. They have fixed it and released 1.1.10. So updating enum34 to 1.1.10 will solve this issue. "pip install enum34==1.1.10"

davisglenn commented 4 years ago

Thanks! I have confirmed that upgrading to enum34 v1.1.10 solved my issue.