Error upgrading to HASS 0.39.0

I’m running HASSBIAN 1.1 on raspberry pi 3 and following these instructions to upgrade to 0.39.0 https://home-assistant.io/docs/hassbian/common-tasks/

I get the following error that prevents upgrade:

Collecting aiohttp==1.3.3 (from homeassistant)
  Using cached aiohttp-1.3.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-kznc3i5x/aiohttp/setup.py", line 10, in <module>
        from setuptools.command.test import test as TestCommand
      File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
      File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 1129, in _exec
      File "<frozen importlib._bootstrap>", line 1467, in exec_module
      File "<frozen importlib._bootstrap>", line 1570, in get_code
      File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
    ValueError: bad marshal data (invalid reference)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kznc3i5x/aiohttp/

Any tips on how to resolve???

While you’re within the virtual environment (the SOURCE command), try running:

pip install --upgrade --no-cache-dir aiohttp==1.3.3

I’ve just tried it and get a similar error:

(homeassistant) homeassistant@hassbian:/home/pi $ pip install --upgrade --no-cache-dir aiohttp==1.3.3
Collecting aiohttp==1.3.3
  Downloading aiohttp-1.3.3.tar.gz (526kB)
    100% |████████████████████████████████| 532kB 1.0MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-jldjxuzd/aiohttp/setup.py", line 10, in <module>
        from setuptools.command.test import test as TestCommand
      File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
      File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 1129, in _exec
      File "<frozen importlib._bootstrap>", line 1467, in exec_module
      File "<frozen importlib._bootstrap>", line 1570, in get_code
      File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
    ValueError: bad marshal data (invalid reference)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jldjxuzd/aiohttp/

So this https://stackoverflow.com/questions/30861493/how-to-fix-python-valueerrorbad-marshal-data suggests it’s a problem with the compiled python. I’d try wiping out the .pyc files, specifically those associated with setuptools and aiohttp.

Thanks for the tips guys. Unfortunately I’m too limited in time to give the above a go. I’ll reinstall Hassbian as that may be a foolproof way to upgrade.

Seems like others have the same issue here: AIOHTTP failing to update when trying to upgrade to 0.38.x