-
Hi, (I've filed this as an issue before, but I am trying here in case anyone in the community might be able to suggest a solution.) I've written an app in pyscript which uses the shapely library. Unfortunately, as of HA 2022.7 this can no longer be imported successfully. The problem is that shapely depends on the geos library installed at the OS level. I've been executing a bash script to install that in the container, but as of 2022.7 and python 3.10, it can no longer be found by pyscript. I basically have a bash script which is triggered on hass restart to install geos. #!/bin/sh
apk update
apk add geos A minimal version of the app is: log.warning("Tester: restarting...")
import shapely
from shapely.geometry import Polygon
from shapely.geometry import MultiPolygon
from shapely.ops import unary_union
log.warning("Tester: We got here!")
# startup trigger
@time_trigger('startup')
def startup():
log.warning("Tester: We even got triggered.") Which gives the log:
I have the app running under 2022.6.7 without problems. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It seems that there is a problem with the wheel which I believe is being installed from the private HA repository into the HA container when running on HAOS (Alpine linux with python 3.10):
For some reason, the libraries installed by Shapely cannot find each other despite being in the same directory. I've filed an issue in the repositories github, but not sure this is a supported usecase. |
Beta Was this translation helpful? Give feedback.
It seems that there is a problem with the wheel which I believe is being installed from the private HA repository into the HA container when running on HAOS (Alpine linux with python 3.10):
For some reason, the libraries installed by Shapely cannot find each other despite being in the same directory.
I've filed an issue in the repositories github, but not sure this is a supported usecase.
home-assistant/wheels#412 (comment)