No Pip? No Platformio?

I’m trying to follow Dr. Zzs’ video on how to turn the TTGO Camera into a video doorbell, but I’m running into a few problems. One of them is that when compiling ttgo_camera.yaml, I get this back.

INFO Reading configuration...
INFO Detected timezone 'CST' with UTC offset -6 and daylight savings time from 03/10/19 02:00:00 to 11/03/19 02:00:00
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/ttgocam
Processing ttgocam (platform: [email protected]; framework: arduino; board: esp-wrover-kit)
--------------------------------------------------------------------------------
Error: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/platformio/__main__.py", line 120, in main
    cli(None, None, None)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 16, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/run.py", line 107, in cli
    result = (envname, ep.process())
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/run.py", line 207, in process
    result = self._run()
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/run.py", line 302, in _run
    self.verbose)
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/run.py", line 325, in _autoinstall_libdeps
    ctx.invoke(cmd_lib_install, libraries=[lib], silent=not verbose)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/lib.py", line 103, in lib_install
    library, silent=silent, interactive=interactive, force=force)
  File "/usr/local/lib/python2.7/dist-packages/platformio/managers/lib.py", line 344, in install
    interactive=interactive)
  File "/usr/local/lib/python2.7/dist-packages/platformio/managers/lib.py", line 245, in search_lib_id
    "/v2/lib/search", dict(query=" ".join(query)), cache_valid="1h")
  File "/usr/local/lib/python2.7/dist-packages/platformio/util.py", line 660, in get_api_result
    result = _get_api_result(url, params, data)
  File "/usr/local/lib/python2.7/dist-packages/platformio/util.py", line 162, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/platformio/util.py", line 623, in _get_api_result
    verify=verify_ssl)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 686, in send
    r.content
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 828, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 755, in generate
    raise ContentDecodingError(e)
ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing: incorrect data check',))

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

And when I do ‘pip install platformio’ it says pip is not installed, which is when I remember that hass.io is just Like That.

Yeah, you aren’t supposed to install packages inside running docker containers.

You can, but the next update will overwrite it.
They are not in the container though. Home Assistant uses python 3 and those are python 2 errors.

We do not have enough information to help. What OS are they running??

I didn’t say you COULDN’T. I said you AREN’T SUPPOSED TO.

1 Like

Uhh, well, I’m running hass.io with 0.93.1. And ESPHome is the hassio addon 1.12.2.

Is that what you meant?

If you are running the Hass.io image, then it is running on HassOS. HAss.io can also run in Linux OS including Raspbian.
I am surprised HassOs would ship with Python 2 though. It goes totally unsupported after the end of this year.

Anyway, even if you could get platformio installed, it would get overwritten the next time you update home assistant.

It sounds like he is referring to the ESPHome Add-on, not the home assistant container.

Perhaps they need to file an issue against the ESPHome addon then.

I use platformio on a regular basis. It’s not something that needs to be installed in the container, or on hassio at all. It’s something that you install locally on your workstation, and use from there. I’m not really sure what they are trying to accomplish using the container like that.

We are talking about a hassio addon. Every dependency of esphome, such as platformio, is included in the addon.

I am not sure if you can use esphome from the commandline using the hassio addon. You’d need to be inside the addon’s docker container.

Was this compilation started from the gui?

Yes, I pressed the compile button in the gui and this is what came out.