# how to debug 'ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleUnicode''

**URL:** <https://forum.ansible.com/t/how-to-debug-error-failed-to-combine-variables-expected-dicts-but-got-a-dict-and-a-ansibleunicode/20830>\
**Category:** Ansible Project\
**Created:** [March 10, 2016, 3:44pm UTC](https://forum.ansible.com/t/how-to-debug-error-failed-to-combine-variables-expected-dicts-but-got-a-dict-and-a-ansibleunicode/20830 "2016-03-10T15:44:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 10, 2016, 3:44pm UTC](https://forum.ansible.com/t/how-to-debug-error-failed-to-combine-variables-expected-dicts-but-got-a-dict-and-a-ansibleunicode/20830/1 "2016-03-10T15:44:45Z")

</div>

Hi,

I’ve been refactoring an inventory file and moving some things out into group and host vars.

When I try and use debug just to check that the inventory file is ok like this:

ansible locahost -i bust\_inventory -m debug

I’m getting

ERROR! failed to combine variables, expected dicts but got a ‘dict’ and a ‘AnsibleUnicode’

I tried running with -vvvvv and ANSIBLE\_DEBUG=1 but this must be causing a failure pretty early on as the only debug output I get is:

20111 1457624523.29459: starting run

Does any one have any suggestions on how I can debug whats wrong with my inventory / group / host vars ?

Jon

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 10, 2016, 3:52pm UTC](https://forum.ansible.com/t/how-to-debug-error-failed-to-combine-variables-expected-dicts-but-got-a-dict-and-a-ansibleunicode/20830/2 "2016-03-10T15:52:43Z")

</div>

… and to answer my own question…

remember when moving inventory vars, which may be expressed as key=value pairs into your host\_vars or group\_vars, that host\_vars and group\_vars expect proper yaml syntax i.e. key: value

Jon
