Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install the addon #72

Open
kirangp opened this issue Dec 12, 2023 · 22 comments
Open

Unable to install the addon #72

kirangp opened this issue Dec 12, 2023 · 22 comments

Comments

@kirangp
Copy link

kirangp commented Dec 12, 2023

I had to reinstall the addon and now whenever I try to install, I always get the below error.

image

Thanks

Log

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:138
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 21:38:00 (4 occurrences)
Last logged: 22:46:33

Failed to to call /addons/eeb054de_modbus_inverter/install - The command '/bin/ash -o pipefail -c pip install --upgrade pycryptodomex==3.11.0 --no-cache-dir -r requirements.txt' returned a non-zero code: 1
Failed to to call /store/repositories - Can't add https://github.com/MatterVN/HassioAddon, already in the store

Managed to dig up more and see this in Supervisor Logs

23-12-12 23:08:15 INFO (MainThread) [supervisor.host.apparmor] Adding/updating AppArmor profile: eeb054de_modbus_inverter
23-12-12 23:08:15 INFO (MainThread) [supervisor.docker.addon] Starting build for eeb054de/aarch64-addon-modbus_inverter:0.3.8
23-12-12 23:08:25 ERROR (MainThread) [supervisor.docker.addon] Can't build eeb054de/aarch64-addon-modbus_inverter:0.3.8: The command '/bin/ash -o pipefail -c pip install --upgrade pycryptodomex==3.11.0 --no-cache-dir -r requirements.txt' returned a non-zero code: 1
23-12-12 23:08:25 ERROR (MainThread) [supervisor.docker.addon] Build log:
Step 1/23 : ARG BUILD_FROM

Step 2/23 : FROM $BUILD_FROM

---> d524bbcac2d5

Step 3/23 : ENV LANG C.UTF-8

---> Using cache

---> 680ba6cc0009

Step 4/23 : ARG BUILD_VERSION

---> Using cache

---> 1ec1d5293eda

Step 5/23 : ARG BUILD_ARCH

---> Using cache

---> 95be34e1f31a

Step 6/23 : COPY requirements.txt ./

---> Using cache

---> f0adae72b86c

Step 7/23 : RUN apk add --no-cache python3-dev py3-pip g++

---> Using cache

---> 6fd6012fbf33

Step 8/23 : RUN pip install --upgrade pycryptodomex==3.11.0 --no-cache-dir -r requirements.txt

---> Running in e32d095d6563

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 e32d095d6563

@str2der
Copy link

str2der commented Dec 13, 2023

Same here!

@mife1005
Copy link

I have the same problem. Hoping for a solution!

@anthony-spruyt
Copy link

Pretty much all the sungrow addons have this problem atm. Tried pinning some different versions but no luck.

@Ralphy140
Copy link

Same issue for me

@kalaws
Copy link

kalaws commented Dec 21, 2023

+1

1 similar comment
@AndersKalen
Copy link

+1

@SoWizard
Copy link

SoWizard commented Dec 27, 2023

Yup ditto - same issue here. Just freshly installed Home Assistant OS, running in VM.

@loucksg
Copy link

loucksg commented Dec 27, 2023

k, so it does not look like the:
pycryptodomex==3.11.0
Is in the main requirements, however I am cautious this is inside the Docker container... just need to work out how to get inside that and the wrapping here, as a blunt hammer may try:
pycryptodomex~=3.11.0
for requirements.txt, that should install anything compatible with 3.11 code stream...

@loucksg
Copy link

loucksg commented Dec 27, 2023

found it in Dockerfile:
COPY requirements.txt ./
RUN apk add --no-cache python3-dev py3-pip g++
RUN pip install --upgrade pycryptodomex==3.11.0 --no-cache-dir -r requirements.txt

Changing to:
COPY requirements.txt ./
RUN apk add --no-cache python3-dev py3-pip g++
RUN pip install --upgrade pycryptodomex~=3.11.0 --no-cache-dir -r requirements.txt

... let's see what goes boom.

@loucksg
Copy link

loucksg commented Dec 27, 2023

pull request created, not sure if someone needs to approve here, will dig a little further around repo

@ltw001
Copy link

ltw001 commented Dec 27, 2023

same here. Also freshly installed Home Assistant OS running in a VM.
@loucksg I'm not sure, how to understand your last answer: what exactly was the outcome and is there a workaround at the moment?
I tried Part 2 from here and it seems to work: https://gist.github.com/Paraphraser/cad3b0aa6428c58ee87bc835ac12ed37

@SoWizard
Copy link

@ltw001 Link seems broken?

@kirangp
Copy link
Author

kirangp commented Jan 4, 2024

@loucksg Is there any way I can install this addon with your pull request in HA? Looks like the pull request has not been approved/merged.

@benborra
Copy link

@loucksg Is there any way I can install this addon with your pull request in HA? Looks like the pull request has not been approved/merged.

I'm guessing we could fork https://github.com/MatterVN/HassioAddon and this repo and fix it on that fork?
I've tried that but I'm rather new to Home Assistant add-ons and can't seem to get the reference from the HassioAddon repo to the submodule to work.

@kilador
Copy link

kilador commented Jan 15, 2024

Same problem here. I try to install the addon following the instructions but still does not work.

is it possible to upload with the fix ?

@sharkpunch5
Copy link

+1 same issue here when attempting to install

bladehstream added a commit to bladehstream/ModbusTCP2MQTT that referenced this issue Feb 23, 2024
@SL666
Copy link

SL666 commented Feb 29, 2024

@ltw001 Link seems broken?

I think it's this -
https://gist.github.com/Paraphraser/cad3b0aa6428c58ee87bc835ac12ed37#part-2--using-patched-images-in-homeassistant

but seems to be referencing gosungrow not modbustcp2mqtt

@RafAustralia
Copy link

same here totally fresh here - how to fix this? - please help

@benborra
Copy link

benborra commented May 3, 2024

same here totally fresh here - how to fix this? - please help

Hi @RafAustralia, this was fixed in a fork over at https://github.com/DisreputableCode/HassioAddons
Been using it from r about a month or 2 without any problems.

@RafAustralia
Copy link

RafAustralia commented May 3, 2024 via email

@RafAustralia
Copy link

RafAustralia commented May 4, 2024 via email

@benborra
Copy link

benborra commented May 4, 2024

No worries, was one of the most complex things I've done so far in home assistant as well.
I unfortunately don't recall which guide I followed but I also had some issues fetching the data from my sungrow converter because I was polling to frequently. Couldn't even reach it directly by IP anymore myself.

I also had to add the MQTT to my Integrations.
image

And there I needed to add my parameters.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests