How to fix this nmcli error - Error: invalid <setting>.<property> 'autoconnect'.\n"

fatal: [redacted]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“autoconnect”: “yes”, “conn_name”: “enp5s0”, “dns4”: “redacted”, “gw4”: “redacted”, “ip4”: “redacted”, “state”: “present”, “type”: “ethernet”}, “module_name”: “nmcli”}, “msg”: “Error: invalid . ‘autoconnect’.\n”, “name”: “enp5s0”, “rc”: 2}

Well, to make the play run, I removed " autoconnect=yes" line. However, that is supposedly the default, so I am not sure why that line was turning into ‘autoconnect’.\n. I tried a few different methods of quoting, putting the whole play on one line, etc. Every syntax method I tried returned the same “‘autoconnect’.\n” in the debug output. Removing the autoconnect assignment made the play run smoothly for each different syntax attempt.

The module code appears to break while parsing the dictionary into a string, at or near line 505. This happens with the DNS entry when I pass in more than one entry as well.

505 dstr+=“%s: %s\n” % ( key, str_val)