HAS failing to start

Hi, Running 0.64 on Ubuntu 16.04, runnning wel for months

Rebooted the VM and the service wont start now, no changes

[email protected]
Loaded: loaded (/etc/systemd/system/home->[email protected]; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-03-22 21:14:11 AEDT; > 1s ago
Process: 1489 ExecStart=/usr/local/bin/hass (code=exited,
status=1/FAILURE)
Main PID: 1489 (code=exited, status=1/FAILURE)

Mar 22 21:14:11 hass hass[1489]: File “/usr/local/lib/python3.5/dist-
packages/pip/download.py”, line 40, in
Mar 22 21:14:11 hass hass[1489]: from pip._vendor import requests,
six
Mar 22 21:14:11 hass hass[1489]: File “/usr/local/lib/python3.5/dist-
packages/pip/_vendor/requests/init.py”, line 98, in
Mar 22 21:14:11 hass hass[1489]: from . import packages
Mar 22 21:14:11 hass hass[1489]: File “/usr/local/lib/python3.5/dist-
packages/pip/_vendor/requests/packages.py”, line 12, in
Mar 22 21:14:11 hass hass[1489]:
sys.modules[‘pip._vendor.requests.packages.’ + mod] =
sys.modules[“pip._vendor.” + mod]
Mar 22 21:14:11 hass hass[1489]: KeyError: ‘pip._vendor.urllib3.contrib’
Mar 22 21:14:11 hass systemd[1]: [email protected]:
Main process exited, code=exited, status=1/FAILURE
Mar 22 21:14:11 hass systemd[1]: [email protected]:
Unit entered failed state.
Mar 22 21:14:11 hass systemd[1]: [email protected]:
Failed with result ‘exit-code’.

just did a quick google search on this, and a potential solution to that problem is to clear the pip cache. No clue if it will work, but your root problem is the key error ‘pip._vendor.urllib3.contrib’.

This link provides a way to clear the cache:

another solution i saw (and used so i know it works) is to downgrade pip from 9.0.2 to 9.0.1.

$ pip install pip==9.0.1

i don’t know if it’s a permanent solution but it worked to get rid of that fault for me. that one came up on upgrading HA from version 61 to version 62.

1 Like

I can now also report that after I just upgraded to HA 0.63.3 which upgraded pip from 9.0.1 to 9.0.3 I didn’t get that error this time.

downgrading PIP fixed this issue

i am wanting to upgrade to 65 but requires python environment update which looks pretty full on

It seems scary but I did it and upgraded my HA and updated to debian stretch all at the same time. It honestly wasn’t too bad.

I can post the procedure I used to do it (twice…since I’ve installed HA on a NUC too) if you need me to.