PIP error only when container restarts

I have been playing with Home Assistant on docker now for a few weeks. Everything is great.

I realize when I went to restart the container, it wouldn’t come back. I get the errors below. If I delete my local config/lsiopy folder before starting the container (docker-compose) it runs just fine again. I saw some other issues regarding permissions around this folder but I am not entirely sure what is going on. Any ideas?

homeassistant | Updating pip to HA supported version
homeassistant | Traceback (most recent call last):
homeassistant | File “/config/lsiopy/bin/pip”, line 5, in
homeassistant | from pip._internal.cli.main import main
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/cli/main.py”, line 9, in
homeassistant | from pip._internal.cli.autocompletion import autocomplete
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py”, line 10, in
homeassistant | from pip._internal.cli.main_parser import create_main_parser
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py”, line 8, in
homeassistant | from pip._internal.cli import cmdoptions
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py”, line 23, in
homeassistant | from pip._internal.cli.parser import ConfigOptionParser
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/cli/parser.py”, line 12, in
homeassistant | from pip._internal.configuration import Configuration, ConfigurationError
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/configuration.py”, line 26, in
homeassistant | from pip._internal.utils.logging import getLogger
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/utils/logging.py”, line 27, in
homeassistant | from pip._internal.utils.misc import ensure_dir
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_internal/utils/misc.py”, line 35, in
homeassistant | from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_vendor/tenacity/init.py”, line 514, in
homeassistant | from pip._vendor.tenacity._asyncio import AsyncRetrying # noqa:E402,I100
homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/pip/_vendor/tenacity/_asyncio.py”, line 21, in
homeassistant | from asyncio import sleep
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/asyncio/init.py”, line 21, in
homeassistant | from .base_events import *
homeassistant | File “/config/lsiopy/lib/python3.11/site-packages/asyncio/base_events.py”, line 296
homeassistant | future = tasks.async(future, loop=self)
homeassistant | ^^^^^
homeassistant | SyntaxError: invalid syntax

Looks like you’re using a custom integration that lists a very old and deprecated version of asyncio as its dependency. Once that’s installed in /config/lsiopy during HA start, pip breaks.

Asyncio has been built into core python since py3.4, which was years ago. The external package was deprecated also years ago. You need to tell the custom integration dev to remove that old version from the deps.

Deprecated 7 years ago to be exact: GitHub - python/asyncio: asyncio historical repository

Ok, thanks. I have added the custom integration of HACS and Homeseer-- so it isn’t a terribly long list. The former is needed for the second… I’ll poke around there and see if I can figure out which one is the culprit…

HACS is not the problem. I have it also and it doesn’t have that dep.

Yes… It is definitely the Homeseer integration…

I see

import asyncio

in a couple of files. I commented those lines out but I don’t think the fix will be quite that simple. Thanks all.

Import is not the issue. Removing that will break the integration.

What needs to be removed is the install dependency on the old version.

1 Like

This is the issue right here:


So I don’t see that file at all in my container. I believe I installed this using the HACS tool.

How would I go about changing it? Would I need to modify that code and push it to GITHUB and somehow tell HACS to use that codebase/branch?

root@c2fe18c2f939:/# find -name “libhomeseer”|grep setup

That file is a build instruction. It’s not something you can change after install. You need to tell the dev to update it.

1 Like

Great… I will add this link to my email to him…

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.