Error during setup of component influxdb - Jan 2019

I get an error in the logs that states that there is an error during the setup on the influxdb component.


019-01-03 18:09:43 ERROR (MainThread) [homeassistant.setup] Error during setup of component influxdb
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/influxdb.py”, line 96, in setup
from influxdb import InfluxDBClient, exceptions
ModuleNotFoundError: No module named ‘influxdb’

What installation method of HA are you using?

I have installed Home Assistant on Docker which is running on an Ubuntu server.

Did you install InfluxDB? What settings did you put in the configuration.yaml under influxdb:?

InfluxDB is installed in a Docker container as well. I did use the InfluxDB HomeAssistant add on and the results were the same.

influxdb:
host: 192.XXX.XXX.XXX
port: 8086
database: home_assistant
username: home_assistant
password: xxxxxxxxxxxxxxxxxxxxx
max_retries: 3
default_measurement: state

So you are using hassio? The remove the InfluxDB you install manually in a Docker container and install the addon. Follow the instructions on the addon page.

Yes, I am using hassio.

I did have the InfluxDB addon running before I installed InfluxDB in Docker and the results were the same.

Try it again. Install the addon and then follow these instructions:

I stopped the InfluxDB Docker container and installed the InfluxDB Addon. I followed the directions assosciated with teh Addon and I get the following in the error log:
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/influxdb.py”, line 96, in setup
from influxdb import InfluxDBClient, exceptions
ModuleNotFoundError: No module named ‘influxdb’

I have solved the problem.

  1. I ran a Snapshot of Home Assistant
  2. I stopped the Home Assistant Docker container
  3. I pulled a new Docker image of Home Assistant (same version as before)
  4. I restarted the Home Assistant Docker container and InfluxDB starting capturing data

There must have been something wrong with the Home Assistant Docker image.