Akulatraxas / ha-modbusproxy

Hassio Addon packaging modus-proxy
Apache License 2.0
37 stars 5 forks source link

The modebusproxy addon no longer works. #20

Closed Vaszago closed 9 months ago

Vaszago commented 9 months ago

The problem is likely that the base image of the container now disallows using pip without venv.

Can you please fix the error.

Thanks

Describe the issue you are experiencing The addon can no longer be installed and this error message appears.

23-12-19 14:38:35 INFO (MainThread) [supervisor.docker.addon] Starting build for 81ab01ea/amd64-addon-modbus_proxy:1.0.15 23-12-19 14:38:38 ERROR (MainThread) [supervisor.docker.addon] Can't build 81ab01ea/amd64-addon-modbus_proxy:1.0.15: The command '/bin/ash -o pipefail -c pip install modbus-proxy' returned a non-zero code: 1 23-12-19 14:38:38 ERROR (MainThread) [supervisor.docker.addon] Build log: Step 1/16 : ARG BUILD_FROM

Step 2/16 : FROM $BUILD_FROM

---> 75c2208b90c6

Step 3/16 : RUN apk add --no-cache python3 py3-pip py3-yaml

---> Using cache

---> 00cb6e652b92

Step 4/16 : RUN pip install modbus-proxy

---> Running in d08bd459b055

error: externally-managed-environment

× This environment is externally managed ╰─> The system-wide python installation should be maintained using the system package manager (apk) only.

If the package in question is not packaged already (and hence installable via "apk add py3-somepackage"), please consider installing it inside a virtual environment, e.g.:

python3 -m venv /path/to/venv . /path/to/venv/bin/activate pip install mypackage

To exit the virtual environment, run:

deactivate

The virtual environment is not deleted, and can be re-entered by re-sourcing the activate file.

To automatically manage virtual environments, consider using pipx (from the pipx package). note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.

Removing intermediate container d08bd459b055

Akulatraxas commented 9 months ago

i was not able to fix it today but ill have a look tomorrow!

Vaszago commented 9 months ago

👍

Akulatraxas commented 9 months ago

It was very weird to reproduce. While i could reproduce it in the devcontainer when i try to actually debug it by building the image like mentioned here (https://developers.home-assistant.io/docs/add-ons/testing/) its just runs and its happy.

Anyway, new version (1.16) fixes the problem. Its merged into main and should be available. https://github.com/Akulatraxas/ha-modbusproxy/pull/21

Vaszago commented 9 months ago

Thanks. Can install the app. But it ends again after starting. See log. Can't find a folder.

image

Al3xand3r1987 commented 9 months ago

Thanks. Can install the app. But it ends again after starting. See log. Can't find a folder.

image

I also have the same problem. The latest update for Modbus Proxy didn't help either

Maikel-K commented 8 months ago

When trying to install version 1.0.18 i get this error message: Failed to install add-on The command '/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip py3-yaml' returned a non-zero code: 3

HA information:

Core 2024.1.4 Supervisor 2023.12.1 Operating System Frontend 20240104.0