Cannot upgrade to 0.36+

So I keep getting an error when upgrading HA to 0.36 or greater. I tried yesterday before 0.36.1 and was hoping it could be fixed with the next update, but that didn’t happen. This is what I get in my console for my pi. I’m running with the all-in-one installer from before the change over to homeassistant being the username.

pi@raspberrypi:~ $ sudo su -s /bin/bash hass
hass@raspberrypi:/home/pi$ source /srv/hass/hass_venv/bin/activate
(hass_venv) hass@raspberrypi:/home/pi$ pip3 install --upgrade homeassistant
Collecting homeassistant
  Downloading homeassistant-0.36.1-py2.py3-none-any.whl (6.6MB)
    100% |████████████████████████████████| 6.6MB 27kB/s
Requirement already up-to-date: pyyaml<4,>=3.11 in /srv/hass/hass_venv/lib/python3.4/site-packages (from homeassistant)
Collecting jinja2>=2.8 (from homeassistant)
  Using cached Jinja2-2.9.4-py2.py3-none-any.whl
Requirement already up-to-date: pip>=7.0.0 in /srv/hass/hass_venv/lib/python3.4/site-packages (from homeassistant)
Collecting typing<4,>=3 (from homeassistant)
  Using cached typing-3.5.3.0.tar.gz
Requirement already up-to-date: async-timeout==1.1.0 in /srv/hass/hass_venv/lib/python3.4/site-packages (from homeassistant)
Requirement already up-to-date: requests<3,>=2 in /srv/hass/hass_venv/lib/python3.4/site-packages (from homeassistant)
Requirement already up-to-date: pytz>=2016.10 in /srv/hass/hass_venv/lib/python3.4/site-packages (from homeassistant)
Collecting voluptuous==0.9.3 (from homeassistant)
  Using cached voluptuous-0.9.3.tar.gz
Collecting aiohttp==1.2 (from homeassistant)
Exception:
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/download.py", line 809, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/download.py", line 715, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 484, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib/python3.4/zipfile.py", line 937, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.4/zipfile.py", line 978, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
(hass_venv) hass@raspberrypi:/home/pi$ exit
exit
pi@raspberrypi:~ $ sudo systemctl restart home-assistant.service

And when I look at my HA, I’m still at 0.35.3 I’m not sure if this is the same as the other thread below, but I physically cannot upgrade at all. So I’m not sure I can implement the “fix” they found.

Any help would be greatly appreciated!

Try using
pip3 install --upgrade --force-reinstall homeassistant

It’s possible you might have a bad file downloaded, and force-reinstall will drop whatever pip has cached and reinstall them from the source.

Note this is based entirely on my python experience since I’m brand new to homeassistant.

Thanks, but I still get the same error unfortunately

pi@raspberrypi:~ $ sudo su -s /bin/bash hass
hass@raspberrypi:/home/pi$ source /srv/hass/hass_venv/bin/activate
(hass_venv) hass@raspberrypi:/home/pi$ pip3 install --upgrade --force-reinstall homeassistant
Collecting homeassistant
  Using cached homeassistant-0.36.1-py2.py3-none-any.whl
Collecting jinja2>=2.8 (from homeassistant)
  Using cached Jinja2-2.9.4-py2.py3-none-any.whl
Collecting async-timeout==1.1.0 (from homeassistant)
  Using cached async_timeout-1.1.0-py3-none-any.whl
Collecting aiohttp==1.2 (from homeassistant)
Exception:
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/download.py", line 809, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/download.py", line 715, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 484, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib/python3.4/zipfile.py", line 937, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.4/zipfile.py", line 978, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

It could be a problem with you running out of disk space somewhere. What does df -h show?

pi@raspberrypi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3.5G  2.3G  1.1G  69% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           463M     0  463M   0% /dev/shm
tmpfs           463M  6.2M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   21M   43M  33% /boot