MODULE FAILURE Ansible failed to complete successfully

I’m at the point of giving up! Can someone please help?

System info:
Ansible 2.4.0.0; Vagrant 2.2.4; Darwin
Trellis 1.0.2: March 13th, 2019

MODULE FAILURE
Shared connection to 127.0.0.1 closed.

Traceback (most recent call last):
File “/tmp/ansible_g34h2iwz/ansible_module_mysql_user.py”, line 651, in

main()
File “/tmp/ansible_g34h2iwz/ansible_module_mysql_user.py”, line 639, in
main
changed = user_add(cursor, user, host, host_all, password, encrypted,
priv, module.check_mode)
File “/tmp/ansible_g34h2iwz/ansible_module_mysql_user.py”, line 294, in
user_add
cursor.execute(“CREATE USER %s@%s IDENTIFIED BY %s”, (user, host,
password))
File “/usr/lib/python3/dist-packages/MySQLdb/cursors.py”, line 234, in
execute
args = tuple(map(db.literal, args))
File “/usr/lib/python3/dist-packages/MySQLdb/connections.py”, line 316, in
literal
s = self.escape(o, self.encoders)
File “/usr/lib/python3/dist-packages/MySQLdb/connections.py”, line 226, in
unicode_literal
return db.string_literal(str(u).encode(unicode_literal.charset))
UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u201c’ in
position 0: ordinal not in range(256)

failed: [default] (item=rootstheme.dev) => {“changed”: false, “failed”: true, “item”: “rootstheme.dev”, “rc”: 0}
to retry, use: --limit @/Applications/MAMP/htdocs/rootstheme.dev/trellis/dev.retry

PLAY RECAP *********************************************************************
default : ok=81 changed=0 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

The main error is:

UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u201c’ in
position 0: ordinal not in range(256)

\u201c is: “

Squint very hard. That’s not the same as: "

Maybe you copy pasted something from a blog and accidentally used fancy quotes?

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.