# Influxdb\_database module TypeError: \_\_init\_\_() got an unexpected keyword argument 'proxies'?

**URL:** <https://forum.ansible.com/t/influxdb-database-module-typeerror-init-got-an-unexpected-keyword-argument-proxies/3769>\
**Category:** Get Help\
**Tags:** ansible-galaxy, ansible\
**Created:** [February 8, 2024, 10:29pm UTC](https://forum.ansible.com/t/influxdb-database-module-typeerror-init-got-an-unexpected-keyword-argument-proxies/3769 "2024-02-08T22:29:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![russellcecalabp](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/russellcecalabp/32/1544_2.png) [@russellcecalabp](https://forum.ansible.com/u/russellcecalabp)\
**Post date:** [February 8, 2024, 10:29pm UTC](https://forum.ansible.com/t/influxdb-database-module-typeerror-init-got-an-unexpected-keyword-argument-proxies/3769/1 "2024-02-08T22:29:34Z")

</div>

Hi,

I have this Ansible task that used to work when my team was using a 1.X InfluxDB. We are upgrading InfluxDB to 2.X and now the task fails. Here is the task:

```auto
- name: InfluxDB | Create InfluxDB database
  influxdb_database:
    database_name: "{{ cluster_name }}"
    hostname: localhost
  when: cluster_name is defined

```

Error message:

```auto
TypeError: __init__ () got an unexpected keyword argument 'proxies'

```

And here is the full error it is getting with InfluxDB 2.X:

```auto
TASK [influxdb : InfluxDB | Create InfluxDB database] **************************
An exception occurred during task execution. To see the full traceback, use -vvv. 
The error was: TypeError: __init__ () got an unexpected keyword argument 'proxies'
fatal: [molecule-host]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1707431296.2575212-2406850-175229074445029/AnsiballZ_influxdb_database.py\", line 100, in <module>\n
_ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1707431296.2575212-2406850-175229074445029/AnsiballZ_influxdb_database.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1707431296.2575212-2406850-175229074445029/AnsiballZ_influxdb_database.py\", line 40, in invoke_module\n
runpy.run_module(mod_name='ansible_collections.community.general.plugins.modules.influxdb_database', 
init_globals=dict(_module_fqn='ansible_collections.community.general.plugins.modules.influxdb_database', _modlib_path=modlib_path),\n File \"/opt/rh/rh-
python38/root/usr/lib64/python3.8/runpy.py\", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py\", line 87, in _run_code\n exec(code, 
run_globals)\n File 
\"/tmp/ansible_community.general.influxdb_database_payload_lhnge8uk/ansible_community.general.influxdb_database_payload.zip/ansible_collections/community/general/plugins/modules/influxdb_database.py\", line 142, in <module>\n File \"/tmp/ansible_community.general.influxdb_database_payload_lhnge8uk/ansible_community.general.influxdb_database_payload.zip/ansible_collections/community/general/plugins/modules/influxdb_database.py\", line 124, in main\n File \"/tmp/ansible_community.general.influxdb_database_payload_lhnge8uk/ansible_community.general.influxdb_database_payload.zip/ansible_collections/community/general/plugins/module_utils/influxdb.py\", line 92, in connect_to_influxdb\nTypeError: __init__ () got an unexpected keyword argument 'proxies'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

```

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 11, 2024, 9:06am UTC](https://forum.ansible.com/t/influxdb-database-module-typeerror-init-got-an-unexpected-keyword-argument-proxies/3769/2 "2024-02-11T09:06:21Z")

</div>

I guess you updated the [Python influxdb library](https://pypi.org/project/influxdb/) as well, and the version you are using is not compatible to the code in community.general.
