AttributeError: 'module' object has no attribute 'cursors'

29 views
Skip to first unread message

Son T

unread,
Nov 13, 2018, 9:38:31 AM11/13/18
to Ansible Project
This is the error I get when using proxysql_manage_config module as documented here: https://docs.ansible.com/ansible/2.5/modules/proxysql_manage_config_module.html

Anyone know how I get around this issue? 

Dick Visser

unread,
Nov 13, 2018, 4:51:35 PM11/13/18
to ansible...@googlegroups.com


On Tue, 13 Nov 2018 at 15:38, 'Son T' via Ansible Project <ansible...@googlegroups.com> wrote:
This is the error I get when using proxysql_manage_config module as documented here: https://docs.ansible.com/ansible/2.5/modules/proxysql_manage_config_module.html

Anyone know how I get around this issue? 

Without showing the actual playbook, that’s going to be difficult.
So, what does the playbook look like?



Dick
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Son T

unread,
Nov 14, 2018, 3:50:15 AM11/14/18
to Ansible Project
Not much, the task in the playbook was simplified as per example:

- name: Create proxysql user in proxy database
  proxysql_mysql_users:
    login_user: "{{ proxysql_admin_user }}"
    login_password: "{{ proxysql_admin_password }}"
    username: "{{ test_user }}"
    password: "{{ test_user_pass }}"
    state: present
    load_to_runtime: true
    save_to_disk: true

But this still errors with that message: attributeError: 'module' object has no attribute 'cursors'. Googling around, I found this article: http://www.gadzmo.com/python/using-pythons-dictcursor-in-mysql-to-return-a-dict-with-keys/ 

I wonder if this a simple fix in the module code to 'import MySQLdb.cursors'..?

dym...@gmail.com

unread,
Nov 22, 2018, 2:08:08 PM11/22/18
to Ansible Project
Did you find the solution?
I have the same issue after ansible 2.7 upgrade.

Son T

unread,
Jan 1, 2019, 6:57:54 AM1/1/19
to ansible...@googlegroups.com
No, I had to perform task using 'shell'.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/746c3035-9544-496c-869a-3c3729350095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages