Cannot upgrade

Although the upgrade fails I can still run Home Assistant with the existing install, unlike hollladiewaldfee. I didn’t lose anything in the failed upgrade. I could try a fresh Hassbian image, but that just means setting up various other stuff all over again. What does resetting the root password give me? I already changed the pi user password as that’s good security practice. I assume the upgrade does not rely on a constant password.

I plan to move the yaml files over from the other Pi. I would assume that should work.

The old Pi is running pretty much okay, but I’m eager to try some of the new HA features.

Sorry think i got posts crossed.

Isnt 0.42.3 the latest, what are you trying to upgrade?

As far as I know, you can’t move file across versions, but I may be wrong, I never had to.

Try copying out and then deleting everything in the /.homeassistant directory, restart HA then upgrade, see what happens.

0.43.2 is the latest. I would hope config should work across versions as the format hasn’t changed. I’ll try that when I have it running. I wouldn’t expect the config to affect the upgrade as it should be just the software that is updated, but I may be missing something.

I see there’s a new version of Hassbian. I may flash a fresh image and start again. It’s not a big deal to do that. Just need to install a couple of extra things afterwards. Cheers

Typo, meant 0.43.2, didn’t realize you were on 0.42.3.

I remember reading somewhere about transferring between versions, cant seem to find it at the moment.

Did you try copying out, and deleting, then let HA rebuild, then upgrade?

If you would like to use your Pi B HASS on your Pi3, try the following.

pip3 install homeassistant==0.33.3

Transfer your config’s, then upgrade.

HI,

Just though I throw my two cents in.
Upgraded from 0.37 and .44.1 using the process below (thanks for that), running on hassbian:

It took several minutes before the HA was up.
Looking at the status of HA using:
sudo systemctl status [email protected]
You can see via the status HA was installing additional software.
Give it a good 10minutes and watch the status, but it does eventually fire up.

Rob.

Same problem, upgrade gives no errors on 0.42.4 and it states in the end 0.44.1 installed but in my screen it says 0.42.4 is still installed upgrade available to 0.44.1.
Never had this problem updating aways worked what strange error is this.

I have also the same error. Trying upgrade from version
0.43.2.

Exception:
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/shutil.py", line 522, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/async_timeout-1.2.0.dist-info/DESCRIPTION.rst' -> '/tmp/pip-hnfxc1ph-uninstall/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/async_timeout-1.2.0.dist-info/DESCRIPTION.rst'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/shutil.py", line 535, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/async_timeout-1.2.0.dist-info/DESCRIPTION.rst'

You figure it out?

HI All,

I am also unable to update on hassbian. I get the following exception when i follow the upgrade docs. And yes I have updated hassbian (raspbian) just prior to trying to upgrade home assistant. Any ideas? Thanks!

> (homeassistant) homeassistant@hassbian:/home/pi $ pip3 install --upgrade homeassistant
> Exception:
> 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 289, in run
>     delete=build_delete) as build_dir:
>   File "/srv/homeassistant/lib/python3.4/site-packages/pip/utils/build.py", line 22, in __init__
>     name = os.path.realpath(tempfile.mkdtemp(prefix="pip-build-"))
>   File "/usr/lib/python3.4/tempfile.py", line 426, in mkdtemp
>     dir = gettempdir()
>   File "/usr/lib/python3.4/tempfile.py", line 370, in gettempdir
>     tempdir = _get_default_tempdir()
>   File "/usr/lib/python3.4/tempfile.py", line 312, in _get_default_tempdir
>     dirlist)
> FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/pi']
> (homeassistant) homeassistant@hassbian:/home/pi $

You are not logged in as your homeassistant user, and/or you are not in the venv, and/or you do not have correct permissions:

Log in to your pi as user pi >

$ sudo su -s /bin/bash homeassistant

$ source /srv/homeassistant/bin/activate

$ pip3 install --upgrade homeassistant

I’m sorry was that directed at me?

Thanks for the reply, but I tried those exact steps, I still get the same “no valid temp directory”. So i guess it could be a permissions issue? Seems weird, it’s always worked before.

What helped me was renaming .homeassistant to a different name and run the upgrade.
After the upgrade I renamed the folder back to the original name and started homeassistant.

Here’s what I did to fix the permission error

sudo chown homeassistant:homeassistant -R /srv/homeassistant/

2 Likes

I had the same issue and after fixing the permission issue I succesfully upgraded from 0,47 to 0,48:

$ sudo systemctl stop [email protected]
$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate
$ sudo chown homeassistant:homeassistant -R /srv/homeassistant/
$ pip3 install --upgrade homeassistant
$ exit
$ sudo reboot

  Found existing installation: homeassistant 0.47.0
    Uninstalling homeassistant-0.47.0:
      Successfully uninstalled homeassistant-0.47.0
Successfully installed homeassistant-0.48.0 requests-2.14.2
1 Like

To add the extra command I am requierd to put in the password, what is the password?

sudo chown homeassistant:homeassistant -R /srv/homeassistant/

(homeassistant) homeassistant@hassbian:/home/pi $ sudo chown homeassistant:homeassistant -R /srv/homeassistant/

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for homeassistant:

password is not required. Maybe you can try to stop homeassistant.service first and then sudo chown homeassistant:homeassistant -R /srv/homeassistant/ and continue with the installation steps?

I notice that I hade a problem with my SD card that f*c**ed up everything. That is now changed and everything is working properly.

1 Like

You should run

sudo chown homeassistant:homeassistant -R /srv/homeassistant/

before entering virtual environment. It so solved my problem.

1 Like

https://community.home-assistant.io/t/cannot-upgrade/16657/39?u=farhud