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

"msg": "'dict object' has no attribute 'iteritems'" #12

Open
eawain opened this issue Feb 13, 2020 · 2 comments
Open

"msg": "'dict object' has no attribute 'iteritems'" #12

eawain opened this issue Feb 13, 2020 · 2 comments

Comments

@eawain
Copy link

eawain commented Feb 13, 2020

Hi been running into issues with some of the roles running ansible 2.9.4 and python 3.6.9
From what I've googled it could be an issue with python 3.0 . I'll try and load an old python 2 instance just for testing to confirm.

Some modules like the snmp module work fine but a straight forward code sample to set hostname of switch fails like this.For time being I've fallen back to the module but I much prefer using roles as it looks cleaner. I've hit some weird idempotentency issues with the module when paired to lists.

dellos_system:
hostname: switcha

Full Debug As Follow
1598 1581615382.81322: Loading TerminalModule 'dellos6' from /home/user/.local/lib/python3.6/site-packages/ansible/plugins/terminal/dellos6.py
1598 1581615382.81572: trying /home/user/.local/lib/python3.6/site-packages/ansible/plugins/cliconf
1598 1581615382.81797: Loading Cliconf 'dellos6' from /home/user/.local/lib/python3.6/site-packages/ansible/plugins/cliconf/dellos6.py
1598 1581615382.81852: trying /home/user/.local/lib/python3.6/site-packages/ansible/plugins/become
1598 1581615382.81921: Loading BecomeModule 'enable' from /home/user/.local/lib/python3.6/site-packages/ansible/plugins/become/enable.py (found_in_cache=True, class_only=False)
<192.168.0.1> attempting to start connection
<192.168.0.1> using connection plugin network_cli
<192.168.0.1> found existing local domain socket, using it!
<192.168.0.1> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<192.168.0.1> updating play_context for connection
<192.168.0.1> 1599 1581615383.12797: trying /home/user/.local/lib/python3.6/site-packages/ansible/plugins/connection/pycache
1599 1581615383.12842: trying /home/user/.local/lib/python3.6/site-packages/ansible/plugins/connection
1599 1581615383.13688: Loaded config def from plugin (connection/ssh)
1599 1581615383.13692: Loading Connection 'ssh' from /home/user/.local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /home/user/.local/lib/python3.6/site-packages/ansible/plugins/connection/pycache:/home/user/.local/lib/python3.6/site-packages/ansible/plugins/connection) (found_in_cache=False, class_only=True)

<192.168.0.1> local domain socket path is /home/user/.ansible/pc/7c9bb661b1
1598 1581615383.16711: Loading ActionModule 'dellos6' from /home/user/.local/lib/python3.6/site-packages/ansible/plugins/action/dellos6.py (searched paths: /home/user/.local/lib/python3.6/site-packages/ansible/plugins/action/pycache:/home/user/.local/lib/python3.6/site-packages/ansible/plugins/action)
1598 1581615383.16761: starting attempt loop
1598 1581615383.16787: running the handler
1598 1581615383.17840: handler run complete
1598 1581615383.17888: attempt loop complete, returning result
1598 1581615383.17917: _execute() done
1598 1581615383.17946: dumping result to json
1598 1581615383.17971: done dumping result, returning
1598 1581615383.18004: done running TaskExecutor() for 192.168.0.1/TASK: Dell-Networking.dellos-system : Provisioning system configuration for dellos6 [e4b97a72-eb95-0db1-ee28-000000000018]
1598 1581615383.18043: sending task result for task e4b97a72-eb95-0db1-ee28-000000000018
1598 1581615383.18143: done sending task result for task e4b97a72-eb95-0db1-ee28-000000000018
1598 1581615383.18185: WORKER PROCESS EXITING
1527 1581615383.18343: marking 192.168.0.1 as failed
1527 1581615383.18373: marking host 192.168.0.1 failed, current state: HOST STATE: block=3, task=4, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
1527 1581615383.18408: ^ failed state is now: HOST STATE: block=3, task=4, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
1527 1581615383.18440: getting the next task for host 192.168.0.1
1527 1581615383.18461: host 192.168.0.1 is done iterating, returning
fatal: [192.168.0.1]: FAILED! => {
"changed": false,
"msg": "'dict object' has no attribute 'iteritems'"
}

@jlec
Copy link

jlec commented May 29, 2020

Fixed in #6

@GRomR1
Copy link

GRomR1 commented Aug 8, 2020

@skg-net please create a new tag (3.0.1) for this fix - #6

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

3 participants