Upgrade 0.45 failed

For me it takes more than 10 minutes, the frontier-silicon-package fsapi needs a lot of time to install after upgrade. Last night it took nearly 20 minutes to start after upgrade to 0.45.0. The following restarts are done in 30 seconds

I get the same error when i try to upgrade…

pi@hassbian:~ $ sudo systemctl stop [email protected]
pi@hassbian:~ $ sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/home/pi $ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@hassbian:/home/pi $ pip3 install --upgrade homeassistant
Traceback (most recent call last):
  File "/srv/homeassistant/bin/pip3", line 7, in <module>
    from pip import main
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/utils/__init__.py", line 27, in <module>
    from pip._vendor import pkg_resources
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 74, in <module>
    __import__('pip._vendor.packaging.requirements')
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py", line 9, in <module>
    from pip._vendor.pyparsing import (
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 4715, in <module>
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1261, in setParseAction
    self.parseAction = list(map(_trim_arity, list(fns)))
  File "/srv/homeassistant/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1043, in _trim_arity
    this_line = extract_stack(limit=2)[-1]
  File "/usr/lib/python3.4/traceback.py", line 301, in extract_stack
    stack = list(_extract_stack_iter(_get_stack(f), limit=limit))
  File "/usr/lib/python3.4/traceback.py", line 65, in _extract_tb_or_stack_iter
    line = linecache.getline(filename, lineno, f.f_globals)
  File "/usr/lib/python3.4/linecache.py", line 15, in getline
    lines = getlines(filename, module_globals)
  File "/usr/lib/python3.4/linecache.py", line 41, in getlines
    return updatecache(filename, module_globals)
  File "/usr/lib/python3.4/linecache.py", line 127, in updatecache
    lines = fp.readlines()
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 7358: invalid continuation byte
(homeassistant) homeassistant@hassbian:/home/pi $ exit
exit
pi@hassbian:~ $ sudo systemctl start [email protected]

Sorry to hear that. But I’m happy that it does not only concerns me :smiley:

I ran a

sudo apt-get update
sudo apt-get upgrade

and now my hassbian wount start at all, all i get in the log is:

pi@hassbian:~ $ sudo journalctl -u [email protected] -f | egrep --color=always 'WARNING|Unable|program was not found in path|True|False|ERROR|exited|$'
-- Logs begin at Mon 2017-05-22 10:26:10 CEST. --
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 1129, in _exec
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 1467, in exec_module
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 1570, in get_code
May 22 10:26:27 hassbian hass[719]: File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
May 22 10:26:27 hassbian hass[719]: ValueError: bad marshal data (invalid reference)
May 22 10:26:27 hassbian systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
May 22 10:26:27 hassbian systemd[1]: Unit [email protected] entered failed state.

I recently made a chang in how i log in to my raspberry pi’s.
I started to use a generated authorized_keys file with winscp.
If i log in with the old way with username and password im able to run the uppgrade!
Now the upgrade is done and im going to wait 10-20 min to see if it comes up…

I still get this thou…

pi@hassbian:~ $ sudo journalctl -u [email protected] -f | egrep --color=always 'WARNING|Unable|program was not found in path|True|False|ERROR|exited|$'
-- Logs begin at Mon 2017-05-22 10:37:44 CEST. --
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 1129, in _exec
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 1467, in exec_module
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 1570, in get_code
May 22 10:38:16 hassbian hass[723]: File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
May 22 10:38:16 hassbian hass[723]: ValueError: bad marshal data (invalid reference)
May 22 10:38:16 hassbian systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
May 22 10:38:16 hassbian systemd[1]: Unit [email protected] entered failed state.

found the sollution to the “bad marshal data” here: https://community.home-assistant.io/t/ha-stopped-working/3977/2

Now the log reports:

pi@hassbian:~ $ sudo journalctl -u [email protected] -f | egrep --color=always 'WARNING|Unable|program was not found in path|True|False|ERROR|exited|$'
-- Logs begin at Mon 2017-05-22 10:56:19 CEST. --
May 22 10:56:34 hassbian systemd[1]: Starting Home Assistant for homeassistant...
May 22 10:56:34 hassbian systemd[1]: Started Home Assistant for homeassistant.
May 22 10:57:19 hassbian hass[722]: 2017-05-22 10:57:19 INFO (Thread-3) [homeassistant.config] Upgrading config directory from 0.44.1 to 0.45.0
May 22 10:57:21 hassbian hass[722]: 2017-05-22 10:57:21 INFO (MainThread) [homeassistant.loader] Loaded sensor from homeassistant.components.sensor
May 22 10:57:22 hassbian hass[722]: Config directory: /home/homeassistant/.homeassistant

So lets wait for hassbian to upgarde itself…

Hassbian wount come alive again…
Cant see anything wrong in the log :frowning:

pi@hassbian:~ $ sudo journalctl -u [email protected] -f | egrep --color=always 'WARNING|Unable|program was not found in path|True|False|ERROR|exited|$'
-- Logs begin at Mon 2017-05-22 11:27:15 CEST. --
May 22 11:27:29 hassbian systemd[1]: Starting Home Assistant for homeassistant...
May 22 11:27:29 hassbian systemd[1]: Started Home Assistant for homeassistant.
May 22 11:27:49 hassbian hass[721]: INFO:homeassistant.loader:Loaded sensor from homeassistant.components.sensor
May 22 11:27:49 hassbian hass[721]: Config directory: /home/homeassistant/.homeassistant

I also had issues while upgrading to 0.45.0, but after all I could solve it.

Still then, although 0.45.0 is installed (if I try to upgrade either with

pip3 install --upgrade homeassistant or
pip3 install homeassistant==0.45.0

, it mentions the version is already latest/0.45.0), 0.44.1 still appears mentioned in the iOS app and in the About section in the GUI.

Does this happen to anyone else?

Thanks in advance.

Maybe try to update Python to 3.5 and temporary deactivate the security method?

Which HTTP error code do you get? Not found, empty resp, connection refused?

Try a force refresh (CTRL+F5 in Chrome)

Still the same, both in Chrome or in iOS app.

Did you maybe install Home-Assistant in a virtual-env and you updated an instance outside this virtual-env?

How did you install hass?

I installed Hassbian.

After reading virtual-env I understood my error, so I tried this way:

and after some time, it all worked out well…

Thanks again and sorry for the noobness :wink:

That’s why we’re here, I was also in those situation not long ago :slight_smile:

1 Like

good for you, but it still does not work for me :stuck_out_tongue:

this is what i have now… I think that I will wipe out everything and do a clean install of hassbian. :sob:

2017-05-22 21:30:53 ERROR (Thread-3) [homeassistant.util.package] Unable to install package sqlalchemy==1.1.9: Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.4/site-packages/pip/commands/install.py”, line 342, in run
prefix=options.prefix_path,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py”, line 878, in install
spinner=spinner,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/utils/init.py”, line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 75, in console_to_str
return s.decode(‘utf_8’)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte
2017-05-22 21:30:53 ERROR (MainThread) [homeassistant.setup] Not initializing recorder because could not install dependency sqlalchemy==1.1.9
2017-05-22 21:30:53 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Could not install all requirements.
2017-05-22 21:31:14 ERROR (Thread-5) [homeassistant.util.package] Unable to install package aiohttp_cors==0.5.3: Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.4/site-packages/pip/commands/install.py”, line 342, in run
prefix=options.prefix_path,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py”, line 878, in install
spinner=spinner,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/utils/init.py”, line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 75, in console_to_str
return s.decode(‘utf_8’)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Not initializing http because could not install dependency aiohttp_cors==0.5.3
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Could not install all requirements.
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of history. Setup failed for dependencies: recorder, http
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not setup all dependencies.
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of api. Setup failed for dependencies: http
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not setup all dependencies.
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of websocket_api. Setup failed for dependencies: http
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not setup all dependencies.
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of frontend. Setup failed for dependencies: api, websocket_api
2017-05-22 21:31:14 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not setup all dependencies.
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of config. Setup failed for dependencies: http
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not setup all dependencies.
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of logbook. Setup failed for dependencies: recorder, frontend
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not setup all dependencies.
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of media_player. Setup failed for dependencies: http
2017-05-22 21:31:16 ERROR (MainThread) [homeassistant.setup] Setup failed for media_player: Could not setup all dependencies.
2017-05-22 21:31:24 WARNING (MainThread) [homeassistant.setup] Setup of telegram_bot is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of light is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of notify is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of binary_sensor is taking over 10 seconds.
2017-05-22 21:31:26 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2017-05-22 21:31:41 ERROR (Thread-7) [homeassistant.util.package] Unable to install package pydroid-ipcam==0.8: Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.4/site-packages/pip/commands/install.py”, line 342, in run
prefix=options.prefix_path,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/srv/homeassistant/lib/python3.4/site-packages/pip/req/req_install.py”, line 878, in install
spinner=spinner,
File “/srv/homeassistant/lib/python3.4/site-packages/pip/utils/init.py”, line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File “/srv/homeassistant/lib/python3.4/site-packages/pip/compat/init.py”, line 75, in console_to_str
return s.decode(‘utf_8’)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x8a in position 20: invalid start byte
2017-05-22 21:31:41 ERROR (MainThread) [homeassistant.setup] Not initializing android_ip_webcam because could not install dependency pydroid-ipcam==0.8
2017-05-22 21:31:41 ERROR (MainThread) [homeassistant.setup] Setup failed for android_ip_webcam: Could not install all requirements.
2017-05-22 21:31:42 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of tts. Setup failed for dependencies: http
2017-05-22 21:31:42 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not setup all dependencies.

(and the log continues on and on like that with other packages)

I could not get it to work, so i had to take 6h to make a fresh install.
Now up and running again…
Made my self a complete guide of the fresh install so that next time i can cut and paste and get it done a little faster…
It takes a bit of time to install everything when you have a quite a big setup. There are a lot of steps you forget you have implemented since last fresh install…

well I am lucky to have a very simple setup as I am only beginning… I should be good with only samba, mosquitto, nmap and one or two other simple stuff.

After making an image of my SD card, I embarked on upgrading from .43 to .45 AIO this morning. I did a:
sudo apt-get update sudo apt-get upgrade
First (took a while), then the typical AIO update route. Took a while before HA was responsive after starting, but patience payed off and everything worked without issue.

I seemed to have the same problem, but the last time I restarted Home Assistant while doing upgrades, I had to do a full re-install.

This time I opened up another terminal and ran:

 tail -f /var/log/syslog

and watched the install process until it had run nmap a couple of times

fresh install did the trick for me… everything works fine now, except for a discovery error at bootup of homeassistant (but it does not seem to influence the good behaviour of homeassistant)