dataiku / dataiku-ansible-modules

A role packaging custom modules to administrate a Dataiku Data Science Studio intance
https://dataiku.com
Apache License 2.0
10 stars 8 forks source link

[ERROR] Module 'collections' has no attribute 'Mapping' #15

Open matt6697 opened 2 years ago

matt6697 commented 2 years ago

The Module 'collections' has no attribute 'Mapping' Python error is encountered when trying to configure LDAP parameters using dss_general_settings in an Ansible role.

Python version : 3.10.5

fatal: [instance]: FAILED! => {"changed": false, "msg": "module 'collections' has no attribute 'Mapping'\n\nTraceback (most recent call last):\n  File \"/tmp/ansible_dss_general_settings_payload_lz8hl8xl/ansible_dss_general_settings_payload.zip/ansible/modules/dss_general_settings.py\", line 125, in run_module\n  File \"/tmp/ansible_dss_general_settings_payload_lz8hl8xl/ansible_dss_general_settings_payload.zip/ansible/module_utils/dataiku_utils.py\", line 64, in extract_keys\n    if isinstance(input_data, collections.Mapping):\nAttributeError: module 'collections' has no attribute 'Mapping'\n\n\n  File \"/root/.ansible/tmp/ansible-tmp-1655226373.4086664-10744-180150376152771/AnsiballZ_dss_general_settings.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1655226373.4086664-10744-180150376152771/AnsiballZ_dss_general_settings.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1655226373.4086664-10744-180150376152771/AnsiballZ_dss_general_settings.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.dss_general_settings', init_globals=dict(_module_fqn='ansible.modules.dss_general_settings', _modlib_path=modlib_path),\n  File \"/usr/local/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/local/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/local/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_dss_general_settings_payload_lz8hl8xl/ansible_dss_general_settings_payload.zip/ansible/modules/dss_general_settings.py\", line 150, in <module>\n  File \"/tmp/ansible_dss_general_settings_payload_lz8hl8xl/ansible_dss_general_settings_payload.zip/ansible/modules/dss_general_settings.py\", line 146, in main\n  File \"/tmp/ansible_dss_general_settings_payload_lz8hl8xl/ansible_dss_general_settings_payload.zip/ansible/modules/dss_general_settings.py\", line 142, in run_module\n"}