# Ansible v2 syntax errors Python 2.6

**URL:** <https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734>\
**Category:** Ansible Developer\
**Created:** [July 11, 2015, 7:10pm UTC](https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734 "2015-07-11T19:10:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Mitchell](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@Ken\_Mitchell](https://forum.ansible.com/u/Ken_Mitchell)\
**Post date:** [July 11, 2015, 7:10pm UTC](https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734/1 "2015-07-11T19:10:16Z")

</div>

I’m scratching my head. This is the first I’ve worked on v2, and with a fresh install from source (following [http://docs.ansible.com/intro\_installation.html](http://docs.ansible.com/intro_installation.html)), I get

`  
ken ~/projects/ansible\_dev/ansible2 # ansible -v  
[ERROR]: Unexpected Exception: invalid syntax (result.py, line 111)

the full traceback was:

Traceback (most recent call last):  
File “/home/ken/projects/ansible\_dev/ansible2/bin/ansible”, line 64, in   
from ansible.cli.adhoc import AdHocCLI as mycli  
File “/home/ken/projects/ansible\_dev/ansible2/lib/ansible/cli/adhoc.py”, line 21, in   
from ansible.executor.task\_queue\_manager import TaskQueueManager  
File “/home/ken/projects/ansible\_dev/ansible2/lib/ansible/executor/task\_queue\_manager.py”, line 33, in   
from ansible.executor.process.result import ResultProcess  
File “/home/ken/projects/ansible\_dev/ansible2/lib/ansible/executor/process/result.py”, line 111  
res = {k: result.\_result[k] for k in set(result.\_result.keys()).difference(C.RESULT\_SANITIZE)}  
^  
SyntaxError: invalid syntax

`

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 11, 2015, 7:11pm UTC](https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734/2 "2015-07-11T19:11:33Z")

</div>

sorry, that was me, i was sure dict comprehensions did work in 2.6

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 11, 2015, 7:16pm UTC](https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734/3 "2015-07-11T19:16:13Z")

</div>

fixed via 4203b699a8d051908d092a17c834da9bd6c061e7, rebase and it  
should be ok now

---

<div class="post-metadata">

**Author:** ![Ken\_Mitchell](https://avatars.discourse-cdn.com/v4/letter/k/5f9b8f/32.png) [@Ken\_Mitchell](https://forum.ansible.com/u/Ken_Mitchell)\
**Post date:** [July 11, 2015, 7:59pm UTC](https://forum.ansible.com/t/ansible-v2-syntax-errors-python-2-6/18734/4 "2015-07-11T19:59:46Z")

</div>

Fixed, thanks!
