Closed gausie closed 10 months ago
if you are not using muslinux like home assistant os you can try the below work around, what is running you home assistant?
pip install awscrt -f https://qqaatw.github.io/aws-crt-python-musllinux/
can be automated with configuration.yaml
shell_command:
hatch_rest_apk: /config/setup_ha_hatch.sh
and automation.yaml
- id: '1646074445984'
alias: APK install
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: shell_command.hatch_rest_apk
data: {}
mode: single
setup_ha_hatch.sh
#!/bin/bash
pip install hatch-rest-api==1.12.1 -f https://qqaatw.github.io/aws-crt-python-musllinux/
exit 0
# old version for below 1.10.0 release
apk -e info make
if [[ $? -eq 0 ]]; then
echo "noop exiting"
exit 0
fi
echo "installing and restarting"
apk add gcc g++ cmake make
pkill python3
I am using the standard Home Assistant Operating System.
From my about page:
Home Assistant 2023.6.3
Supervisor 2023.06.4
Operating System 10.3
Frontend 20230608.0 - latest
Even after adding the steps above, I get
Config flow could not be loaded: <html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>openresty</center> </body> </html>
when I try to configure the integration
Ah that is because
Timed out running command: `/config/setup_ha_hatch.sh`, after: 60s
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/shell_command/__init__.py", line 87, in async_service_handler
stdout_data, stderr_data = await process.communicate()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/subprocess.py", line 198, in communicate
stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/subprocess.py", line 178, in _read_stream
output = await stream.read()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/streams.py", line 683, in read
block = await self.read(self._limit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/streams.py", line 690, in read
await self._wait_for_data('read')
File "/usr/local/lib/python3.11/asyncio/streams.py", line 522, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/shell_command/__init__.py", line 86, in async_service_handler
async with async_timeout.timeout(COMMAND_TIMEOUT):
File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 129, in __aexit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.11/site-packages/async_timeout/__init__.py", line 212, in _do_exit
raise asyncio.TimeoutError
TimeoutError
given your error you should try this version of setup_ha_hatch.sh
#!/bin/bash
apk -e info make
if [[ $? -eq 0 ]]; then
echo "noop exiting"
exit 0
fi
echo "installing and restarting"
apk add gcc g++ cmake make
pkill python3
I am getting the same error- I use HA with Docker on the latest version.
2023-07-09 00:11:03.194 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration ha_hatch: Requirements for ha_hatch not found: ['hatch_rest_api==1.20.4', 'awscrt>=0.16.21']. homeassistant.requirements.RequirementsNotFound: Requirements for ha_hatch not found: ['hatch_rest_api==1.20.4'].
when you delete the integration and try to add it again, you get this error in the UI:
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble
not sure what's going on with your error @matchmee but that package is https://pypi.org/project/hatch-rest-api/ and I just setup a fresh docker of homeassistant stable on osx host and the integration didn't have any install problems
`Config flow could not be loaded:
`
When I check the logs:
`Logger: homeassistant.util.package Source: util/package.py:107 First occurred: 12:10:10 AM (2 occurrences) Last logged: 12:11:03 AM
Unable to install package hatch_rest_api==1.20.4: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [68 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-armv7l-cpython-311 creating build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/websocket.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/common.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt5.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/_test.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/checksums.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/s3.py -> build/lib.linux-armv7l-cpython-311/awscrt creating build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream running build_ext Traceback (most recent call last): File "
Has something changed with the newest HA that makes me have to have CMake installed? Why is this happening with the new version of HA?
I tightened the dependency chain with version 1.16.1, does that resolve your issues?
Here are the logs:
`This error originated from a custom integration.
Logger: aiohttp.server Source: custom_components/ha_hatch/config_flow.py:79 Integration: Hatch Rest Mini/Plus (documentation, issues) First occurred: 1:03:55 AM (3 occurrences) Last logged: 1:04:15 AM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, *request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ha_hatch/config_flow.py", line 79, in async_step_user
from hatch_rest_api import Hatch
File "/usr/local/lib/python3.11/site-packages/hatch_rest_api/init.py", line 4, in
Sorry 1.16.1 had a bug where the dependencies weren't declared due to an error introduced when I changed how the library is packaged, 1.16.2 should no longer have that error
sorry man, I tried it again this morning but still getting this error:
`Logger: homeassistant.util.package Source: util/package.py:107 First occurred: 9:43:17 AM (1 occurrences) Last logged: 9:43:17 AM
Unable to install package hatch_rest_api==1.20.8: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [68 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-armv7l-cpython-311 creating build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/crypto.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/auth.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/init.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/http.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/websocket.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/exceptions.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/common.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/mqtt5.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/_test.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/io.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/checksums.py -> build/lib.linux-armv7l-cpython-311/awscrt copying awscrt/s3.py -> build/lib.linux-armv7l-cpython-311/awscrt creating build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/init.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream copying awscrt/eventstream/rpc.py -> build/lib.linux-armv7l-cpython-311/awscrt/eventstream running build_ext Traceback (most recent call last): File "
and when I try to load the integration I get this pop up error:
`Config flow could not be loaded:
`
you can use version 1.15.5 I don't know what is wrong with your platform but awscrt officially supports muslinux which is what the official home assistant docker image utilizes so the old work around were removed in 1.16.0, but you can continue using 1.15.5 for the workarounds
The config wizard times out when I try to use it and checking the logs it seems the installation may have silently failed with the following message