# Error 'Task' object has no attribute 'async\_val' after ansible upgrade

**URL:** <https://forum.ansible.com/t/error-task-object-has-no-attribute-async-val-after-ansible-upgrade/27157>\
**Category:** Ansible Project\
**Created:** [March 29, 2018, 9:01pm UTC](https://forum.ansible.com/t/error-task-object-has-no-attribute-async-val-after-ansible-upgrade/27157 "2018-03-29T21:01:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eshan\_TANDON](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@eshan\_TANDON](https://forum.ansible.com/u/eshan_TANDON)\
**Post date:** [March 29, 2018, 9:01pm UTC](https://forum.ansible.com/t/error-task-object-has-no-attribute-async-val-after-ansible-upgrade/27157/1 "2018-03-29T21:01:06Z")

</div>

Hi Everyone,  
I am starting to see the following error since the ansible upgrade to 2.5:

The full traceback is:

Traceback (most recent call last):

File “/usr/local/lib/python2.7/site-packages/ansible/executor/task\_executor.py”, line 130, in run

res = self.\_execute()

File “/usr/local/lib/python2.7/site-packages/ansible/executor/task\_executor.py”, line 528, in \_execute

result = self.\_handler.run(task\_vars=variables)

File “/usr/local/lib/python2.7/site-packages/ansible/plugins/action/command.py”, line 23, in run

wrap\_async = self.\_task.async\_val and not self.\_connection.has\_native\_async

AttributeError: ‘Task’ object has no attribute ‘async\_val’

fatal: [localhost]: FAILED! =\> {

“msg”: “Unexpected failure during module execution.”,

“stdout”: “”

}

I tried downgrading the Ansible 2.4.2.0 again but the error still persists. The same script was working fine before the upgrade.  
Can anyone provide me any pointers on how to fix this?

Thanks,

Eshan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 29, 2018, 9:53pm UTC](https://forum.ansible.com/t/error-task-object-has-no-attribute-async-val-after-ansible-upgrade/27157/2 "2018-03-29T21:53:49Z")

</div>

You seem to be mixing versions, in 2.5 we internally changed all  
references to 'aysnc' to 'async\_val' due to Python 3.7 compatibility  
issues, but you should not get that error unless part of the code is  
from a previous version.

I recommend you remove all versions of Ansible and check no stray  
\*.pyc/pyo files are left, install clean and it should all work.
