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

ERROR argument of type NoneType is not iterable #24

Open
opcache opened this issue Oct 10, 2019 · 7 comments
Open

ERROR argument of type NoneType is not iterable #24

opcache opened this issue Oct 10, 2019 · 7 comments

Comments

@opcache
Copy link

opcache commented Oct 10, 2019

2019-10-10 06:14:40 | ERROR - argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/usr/local/python37/lib/python3.7/site-packages/ansible_api/controller.py", line 106, in post
response = await loop.run_in_executor(pool, self.run, target, name, module, arg, cb)
File "/usr/local/python37/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/python37/lib/python3.7/site-packages/ansible_api/controller.py", line 119, in run
event_handler=cb.event_handler, status_handler=cb.status_handler
File "/usr/local/python37/lib/python3.7/site-packages/ansible_runner/interface.py", line 162, in run
r.run()
File "/usr/local/python37/lib/python3.7/site-packages/ansible_runner/runner.py", line 177, in run
searchwindowsize=100)
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/spawnbase.py", line 341, in expect
timeout, searchwindowsize, async_)
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/expect.py", line 111, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 500, in read_nonblocking
return super(spawn, self).read_nonblocking(size)
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/spawnbase.py", line 179, in read_nonblocking
self._log(s, 'read')
File "/usr/local/python37/lib/python3.7/site-packages/pexpect/spawnbase.py", line 130, in _log
second_log.write(s)
File "/usr/local/python37/lib/python3.7/site-packages/ansible_runner/utils.py", line 251, in write
event_data = self._emit_event(value[:match.start()], event_data)
File "/usr/local/python37/lib/python3.7/site-packages/ansible_runner/utils.py", line 326, in _emit_event
self._event_callback(event_data)
File "/usr/local/python37/lib/python3.7/site-packages/ansible_runner/runner.py", line 68, in event_callback
should_write = self.event_handler(event_data)
File "/usr/local/python37/lib/python3.7/site-packages/ansible_api/callback.py", line 31, in event_handler
detail = rpt.detail()
File "/usr/local/python37/lib/python3.7/site-packages/ansible_api/report.py", line 88, in detail
if o in detail['res']:
TypeError: argument of type 'NoneType' is not iterable
[2019-10-10 06:14:40 +0000] - (sanic.access)[INFO][192.168.56.1:55071]: POST http://192.168.56.102:8765/command 200 62
2019-10-10 06:14:40 | INFO -
[2019-10-10 06:14:45 +0000] [522] [DEBUG] KeepAlive Timeout. Closing connection.
2019-10-10 06:14:45 | DEBUG - KeepAlive Timeout. Closing connection

@opcache
Copy link
Author

opcache commented Oct 10, 2019

callback.py 里面这句def status_handler(self, data, runner_config=None):
貌似有错误 runner_config=None

@lfbear
Copy link
Owner

lfbear commented Oct 11, 2019

please show the version of ansible and ansible-runner (pip/pip3 list| grep ansibile)

@opcache
Copy link
Author

opcache commented Oct 11, 2019

[root@aaa]# pip3 list| grep ansible
ansible 2.8.5
ansible-api 0.5.0
ansible-runner 1.4.2

@opcache
Copy link
Author

opcache commented Oct 11, 2019

感谢回复,我ansible 2.6.4 用这个版本正常了

@jmm94
Copy link

jmm94 commented May 5, 2020

pip3 list| grep ansible
ansible 2.9.6
ansible-api 0.5.0
ansible-runner 1.4.6

ERROR status_handler() got an unexpected keyword argument runner_config #25

a possible next fix for this issue ?

@slefol
Copy link

slefol commented Nov 20, 2020

I am same issue with :
ansible 2.9.6
ansible-api 0.5.0
ansible-runner 1.4.6

a possible next fix for this issue ?

@slefol
Copy link

slefol commented Nov 20, 2020

I am same issue with :
ansible 2.9.6
ansible-api 0.5.0
ansible-runner 1.4.6

a possible next fix for this issue ?

i installed from the command 'python setup.py install' and it's works !
(python-3.7.3, ansible-2.10.3, ansible_runner-1.4.6, ansible_api-0.5.1)

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

4 participants